From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, nicolas.dichtel@6wind.com
Subject: [PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'
Date: Tue, 2 Feb 2016 16:53:40 -0800 [thread overview]
Message-ID: <1454460820-21851-1-git-send-email-roopa@cumulusnetworks.com> (raw)
From: Roopa Prabhu <roopa@cumulusnetworks.com>
'ip monitor all' is broken on older kernels.
This patch fixes 'ip monitor all' to match
'all' and not 'all-nsid'.
It moves parsing arg 'all-nsid' to after parsing
'all'.
Before:
$ip monitor all
NETLINK_LISTEN_ALL_NSID: Protocol not available
After:
$ip monitor all
[NEIGH]Deleted 10.0.0.1 dev eth1 lladdr c4:54:44:4f:b2:dd STALE
Fixes: 449b824ad196 ("ipmonitor: allows to monitor in several netns")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
ip/ipmonitor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index 99a237f..7aeccd2 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -186,8 +186,6 @@ int do_ipmonitor(int argc, char **argv)
file = *argv;
} else if (matches(*argv, "label") == 0) {
prefix_banner = 1;
- } else if (matches(*argv, "all-nsid") == 0) {
- listen_all_nsid = 1;
} else if (matches(*argv, "link") == 0) {
llink=1;
groups = 0;
@@ -217,6 +215,8 @@ int do_ipmonitor(int argc, char **argv)
groups = 0;
} else if (strcmp(*argv, "all") == 0) {
prefix_banner=1;
+ } else if (matches(*argv, "all-nsid") == 0) {
+ listen_all_nsid = 1;
} else if (matches(*argv, "help") == 0) {
usage();
} else if (strcmp(*argv, "dev") == 0) {
--
1.9.1
next reply other threads:[~2016-02-03 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 0:53 Roopa Prabhu [this message]
2016-02-03 8:20 ` [PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid' Nicolas Dichtel
2016-02-05 0:48 ` 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=1454460820-21851-1-git-send-email-roopa@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=stephen@networkplumber.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