[PATCH] iproute2: Add dsfield as alias for tos for ip rules

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Hannemann
Date: Friday, May 21, 2010 - 7:10 am

From: Arnd Hannemann <arnd@rhea.(none)>

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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ip/iprule.c b/ip/iprule.c
index 7140375..cbf8226 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -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))
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] iproute2: Add dsfield as alias for tos for ip rules, Arnd Hannemann, (Fri May 21, 7:10 am)
Re: [PATCH] iproute2: Add dsfield as alias for tos for ip ..., Stephen Hemminger, (Fri Jul 23, 1:22 pm)