iproute2: a non-expected rtnl message is an error

This commit is contained in:
david decotigny 2016-11-11 10:55:37 -08:00 committed by Stephen Hemminger
parent 8be2955816
commit ba7b97776e
1 changed files with 1 additions and 1 deletions

View 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;