summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-02-25 18:18:07 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:36 -0400
commitd9f5b2f50f53d625986dbd47cd12778c9f841f0c (patch)
tree8ecb06f5a9bc83505ed4b4eaa61754eb76238573 /zebra/if_netlink.c
parent8b5bdc8bdfdb95d5e22ccb8733dbd35c84f3f79d (diff)
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/if_netlink.c')
-rw-r--r--zebra/if_netlink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index b402cc4965..52d91007b4 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -66,6 +66,7 @@
#include "zebra/zebra_ptm.h"
#include "zebra/zebra_mpls.h"
#include "zebra/kernel_netlink.h"
+#include "zebra/rt_netlink.h"
#include "zebra/if_netlink.h"
#include "zebra/zebra_errors.h"
#include "zebra/zebra_vxlan.h"
@@ -1477,6 +1478,11 @@ int netlink_protodown(struct interface *ifp, bool down)
void interface_list(struct zebra_ns *zns)
{
interface_lookup_netlink(zns);
+ /* We add routes for interface address,
+ * so we need to get the nexthop info
+ * from the kernel before we can do that
+ */
+ netlink_nexthop_read(zns);
interface_addr_lookup_netlink(zns);
}