Import patch iproute2.118
(Logical change 1.120)
diff --git a/ip/ipmonitor.c b/ip/ipmonitor.c
index 7f5041a..cdaeb6f 100644
--- a/ip/ipmonitor.c
+++ b/ip/ipmonitor.c
@@ -55,6 +55,10 @@
print_neigh(who, n, arg);
return 0;
}
+ if (n->nlmsg_type == RTM_NEWPREFIX) {
+ print_prefix(who, n, arg);
+ return 0;
+ }
if (n->nlmsg_type == 15) {
char *tstr;
time_t secs = ((__u32*)NLMSG_DATA(n))[0];
@@ -87,6 +91,7 @@
int llink=0;
int laddr=0;
int lroute=0;
+ int lprefix=0;
ipaddr_reset_filter(1);
iproute_reset_filter();
@@ -105,6 +110,9 @@
} else if (matches(*argv, "route") == 0) {
lroute=1;
groups = 0;
+ } else if (matches(*argv, "prefix") == 0) {
+ lprefix=1;
+ groups = 0;
} else if (strcmp(*argv, "all") == 0) {
groups = ~RTMGRP_TC;
} else if (matches(*argv, "help") == 0) {
@@ -130,6 +138,10 @@
if (!preferred_family || preferred_family == AF_INET6)
groups |= RTMGRP_IPV6_ROUTE;
}
+ if (lprefix) {
+ if (!preferred_family || preferred_family == AF_INET6)
+ groups |= RTMGRP_IPV6_PREFIX;
+ }
if (file) {
FILE *fp;