mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-05 08:56:05 +00:00
ipmonitor: match user option 'all' before 'all-nsid'
'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: 449b824ad1 ("ipmonitor: allows to monitor in several netns")
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
This commit is contained in:
parent
2486337aac
commit
a9390c921a
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user