From: Stephen Hemminger <sthem...@microsoft.com> Every non-multicast route prints an error message. Kernel doesn't filter out unicast routes, it is up to filter function to do this.
Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- ip/ipmroute.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ip/ipmroute.c b/ip/ipmroute.c index aa5029b44f41..03ca0575e571 100644 --- a/ip/ipmroute.c +++ b/ip/ipmroute.c @@ -75,15 +75,14 @@ int print_mroute(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) fprintf(stderr, "BUG: wrong nlmsg len %d\n", len); return -1; } - if (r->rtm_type != RTN_MULTICAST) { - fprintf(stderr, "Not a multicast route (type: %s)\n", - rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1))); + + if (r->rtm_type != RTN_MULTICAST) return 0; - } parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len); table = rtm_get_table(r, tb); + if (filter.tb > 0 && filter.tb != table) return 0; -- 2.16.1