]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: Add dsfield as alias for tos for ip rules
authorArnd Hannemann <arnd@rhea.(none)>
Fri, 21 May 2010 04:10:09 +0000 (04:10 +0000)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 23 Jul 2010 19:27:14 +0000 (12:27 -0700)
Get ip rule parsing of "dsfield" in sync with ip route parsing and manual page.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
ip/iprule.c

index d3b97e2ab590f15b4cf69cd0770d657e9e90c4a9..9318d8cad087522a0184846c247b030c01d8ce46 100644 (file)
@@ -270,7 +270,8 @@ static int iprule_modify(int cmd, int argc, char **argv)
                        if (get_u32(&pref, *argv, 0))
                                invarg("preference value is invalid\n", *argv);
                        addattr32(&req.n, sizeof(req), FRA_PRIORITY, pref);
-               } else if (strcmp(*argv, "tos") == 0) {
+               } else if (strcmp(*argv, "tos") == 0 ||
+                          matches(*argv, "dsfield") == 0) {
                        __u32 tos;
                        NEXT_ARG();
                        if (rtnl_dsfield_a2n(&tos, *argv))