netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
To: shemminger@osdl.org
Cc: netdev@vger.kernel.org, Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Subject: [PATCH] iproute2: Add dsfield as alias for tos for ip rules
Date: Fri, 21 May 2010 16:10:09 +0200	[thread overview]
Message-ID: <1274451009-29456-1-git-send-email-hannemann@nets.rwth-aachen.de> (raw)

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


             reply	other threads:[~2010-05-21 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 14:10 Arnd Hannemann [this message]
2010-07-23 20:22 ` [PATCH] iproute2: Add dsfield as alias for tos for ip rules Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274451009-29456-1-git-send-email-hannemann@nets.rwth-aachen.de \
    --to=hannemann@nets.rwth-aachen.de \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).