diff options
Diffstat (limited to 'zebra/kernel_netlink.c')
| -rw-r--r-- | zebra/kernel_netlink.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 23f1a3bf86..c3d5bf8428 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -290,6 +290,18 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id, return netlink_neigh_change(h, ns_id); case RTM_DELNEIGH: return netlink_neigh_change(h, ns_id); + case RTM_GETNEIGH: + /* + * Kernel in some situations when it expects + * user space to resolve arp entries, we will + * receive this notification. As we don't + * need this notification and as that + * we don't want to spam the log file with + * below messages, just ignore. + */ + if (IS_ZEBRA_DEBUG_KERNEL) + zlog_debug("Received RTM_GETNEIGH, ignoring"); + break; case RTM_NEWRULE: return netlink_rule_change(h, ns_id, startup); case RTM_DELRULE: @@ -1086,7 +1098,7 @@ int netlink_request(struct nlsock *nl, struct nlmsghdr *n) netlink_socket (). */ void kernel_init(struct zebra_ns *zns) { - unsigned long groups; + uint32_t groups; #if defined SOL_NETLINK int one, ret; #endif @@ -1107,9 +1119,9 @@ void kernel_init(struct zebra_ns *zns) RTMGRP_IPV6_IFADDR | RTMGRP_IPV4_MROUTE | RTMGRP_NEIGH | - (1 << (RTNLGRP_IPV4_RULE - 1)) | - (1 << (RTNLGRP_IPV6_RULE - 1)) | - (1 << (RTNLGRP_NEXTHOP - 1)); + ((uint32_t) 1 << (RTNLGRP_IPV4_RULE - 1)) | + ((uint32_t) 1 << (RTNLGRP_IPV6_RULE - 1)) | + ((uint32_t) 1 << (RTNLGRP_NEXTHOP - 1)); snprintf(zns->netlink.name, sizeof(zns->netlink.name), "netlink-listen (NS %u)", zns->ns_id); |
