[PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'

Subsystems: the rest

STALE3842d

3 messages, 3 authors, 2016-02-05 · open the first message on its own page

[PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'

From: Roopa Prabhu <hidden>
Date: 2016-02-03 00:53:44

From: Roopa Prabhu <redacted>

'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 <redacted>
---
 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

Re: [PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'

From: Nicolas Dichtel <hidden>
Date: 2016-02-03 08:20:48

Le 03/02/2016 01:53, Roopa Prabhu a écrit :
From: Roopa Prabhu <redacted>

'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 <redacted>
Acked-by: Nicolas Dichtel <redacted>

Re: [PATCH iproute2] ipmonitor: match user option 'all' before 'all-nsid'

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2016-02-05 00:48:47

On Tue,  2 Feb 2016 16:53:40 -0800
Roopa Prabhu [off-list ref] wrote:
From: Roopa Prabhu <redacted>

'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 <redacted>
Applied thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help