298fb7c2f4
Copy from network:utilities/iproute2 based on submit request 20502 from user sax2 OBS-URL: https://build.opensuse.org/request/show/20502 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=23
32 lines
817 B
Diff
32 lines
817 B
Diff
--- ip/ipmonitor.c
|
|
+++ ip/ipmonitor.c
|
|
@@ -102,6 +102,7 @@ int do_ipmonitor(int argc, char **argv)
|
|
int laddr=0;
|
|
int lroute=0;
|
|
int lprefix=0;
|
|
+ int lneigh=0;
|
|
|
|
rtnl_close(&rth);
|
|
ipaddr_reset_filter(1);
|
|
@@ -124,6 +125,9 @@ int do_ipmonitor(int argc, char **argv)
|
|
} else if (matches(*argv, "prefix") == 0) {
|
|
lprefix=1;
|
|
groups = 0;
|
|
+ } else if (matches(*argv, "neigh") == 0) {
|
|
+ lneigh=1;
|
|
+ groups = 0;
|
|
} else if (strcmp(*argv, "all") == 0) {
|
|
groups = ~RTMGRP_TC;
|
|
} else if (matches(*argv, "help") == 0) {
|
|
@@ -153,7 +157,9 @@ int do_ipmonitor(int argc, char **argv)
|
|
if (!preferred_family || preferred_family == AF_INET6)
|
|
groups |= nl_mgrp(RTNLGRP_IPV6_PREFIX);
|
|
}
|
|
-
|
|
+ if (lneigh) {
|
|
+ groups |= nl_mgrp(RTNLGRP_NEIGH);
|
|
+ }
|
|
if (file) {
|
|
FILE *fp;
|
|
fp = fopen(file, "r");
|