]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: a non-expected rtnl message is an error
authordavid decotigny <ddecotig@gmail.com>
Fri, 11 Nov 2016 18:55:37 +0000 (10:55 -0800)
committerStephen Hemminger <sthemmin@microsoft.com>
Tue, 29 Nov 2016 20:44:30 +0000 (12:44 -0800)
ip/iproute.c

index dae793b7538fd984de251231e9e367eb641217c8..10d0afe7bf98d882b98b3995c8bdec0393169b86 100644 (file)
@@ -320,7 +320,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
        if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
                fprintf(stderr, "Not a route: %08x %08x %08x\n",
                        n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
-               return 0;
+               return -1;
        }
        if (filter.flushb && n->nlmsg_type != RTM_NEWROUTE)
                return 0;