diff options
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 5facfa5faa..6a258e6853 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -644,12 +644,14 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, if (gate) memcpy(&nh.gate, gate, sz); rib_delete(afi, SAFI_UNICAST, vrf_id, proto, 0, flags, - &p, &src_p, &nh, table, metric, true); + &p, &src_p, &nh, table, metric, distance, + true); } else { /* XXX: need to compare the entire list of nexthops * here for NLM_F_APPEND stupidity */ rib_delete(afi, SAFI_UNICAST, vrf_id, proto, 0, flags, - &p, &src_p, NULL, table, metric, true); + &p, &src_p, NULL, table, metric, distance, + true); } } @@ -763,11 +765,9 @@ int netlink_route_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) return 0; } - if (!(rtm->rtm_family == AF_INET || rtm->rtm_family == AF_INET6 - || rtm->rtm_family == AF_ETHERNET - || rtm->rtm_family == AF_MPLS)) { + if (!(rtm->rtm_family == AF_INET || rtm->rtm_family == AF_INET6)) { zlog_warn( - "Invalid address family: %d received from kernel route change: %d", + "Invalid address family: %u received from kernel route change: %u", rtm->rtm_family, h->nlmsg_type); return 0; } @@ -780,10 +780,6 @@ int netlink_route_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) nl_rttype_to_str(rtm->rtm_type), nl_rtproto_to_str(rtm->rtm_protocol), ns_id); - /* We don't care about change notifications for the MPLS table. */ - /* TODO: Revisit this. */ - if (rtm->rtm_family == AF_MPLS) - return 0; len = h->nlmsg_len - NLMSG_LENGTH(sizeof(struct rtmsg)); if (len < 0) { @@ -2422,7 +2418,7 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id) return netlink_ipneigh_change(h, len, ns_id); else { zlog_warn( - "Invalid address family: %d received from kernel neighbor change: %d", + "Invalid address family: %u received from kernel neighbor change: %u", ndm->ndm_family, h->nlmsg_type); return 0; } |
