summaryrefslogtreecommitdiffstats
path: root/zebra/kernel_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-02-26 00:18:07 +0100
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 17:13:36 +0200
commitd9f5b2f50f53d625986dbd47cd12778c9f841f0c (patch)
tree8ecb06f5a9bc83505ed4b4eaa61754eb76238573 /zebra/kernel_netlink.c
parentzebra: Remove afi field in nexthop hash entry (diff)
downloadfrr-d9f5b2f50f53d625986dbd47cd12778c9f841f0c.tar.xz
frr-d9f5b2f50f53d625986dbd47cd12778c9f841f0c.zip
zebra: Add functionality to parse RTM_NEWNEXTHOP and RTM_DELNEXTHOP messages
Add the functionality to parse new nexthop group messages from the kernel and insert them into the appropriate hash tables. Parsing is done at startup between interface and interface address lookup. Add functionality to parse changes to nexthops we already have. Add functionality to parse delete nexthop messages from the kernel and remove them from our table. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
-rw-r--r--zebra/kernel_netlink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 7889c70cf..a81788028 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -295,13 +295,9 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
case RTM_DELRULE:
return netlink_rule_change(h, ns_id, startup);
case RTM_NEWNEXTHOP:
+ return netlink_nexthop_change(h, ns_id, startup);
case RTM_DELNEXTHOP:
- case RTM_GETNEXTHOP:
- if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug("Got a nexthop: %s(%d) message!",
- nl_msg_type_to_str(h->nlmsg_type),
- h->nlmsg_type);
- break;
+ return netlink_nexthop_change(h, ns_id, startup);
default:
/*
* If we have received this message then