]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: inform user when a neighbor is removed
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 8 Oct 2012 16:48:23 +0000 (09:48 -0700)
committerStephen Hemminger <shemminger@vyatta.com>
Mon, 8 Oct 2012 16:48:23 +0000 (09:48 -0700)
When running 'ip monitor neigh', there is no hint to tell if a neighbor is
updated or deleted.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/ipneigh.c

index 93cfba257211e0b497fadc8dfc6cbe30e09cbf67..56e56b2d2532434cb5bffdc01f1a0eaaeaf8b9b5 100644 (file)
@@ -249,6 +249,8 @@ int print_neigh(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
                        return 0;
        }
 
+       if (n->nlmsg_type == RTM_DELNEIGH)
+               fprintf(fp, "delete ");
        if (tb[NDA_DST]) {
                fprintf(fp, "%s ",
                        format_host(r->ndm_family,