summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2019-02-13 15:32:59 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-10-25 11:13:36 -0400
commit79580b5ac4ba584baf2a50825949abff18c77f91 (patch)
treef4de2b56c5f783b2c217c4a1d654d801876e09b0
parentda0ad5cfc8485d67b88b6d37e9bdff3e404514c6 (diff)
zebra: Add base functionality for nexthop messages in kernel_netlink
Add some base functionality so we can verify we are getting messages about nexthops from the kernel. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
-rw-r--r--zebra/kernel_netlink.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 615926b0de..7889c70cff 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -99,6 +99,9 @@ static const struct message nlmsg_str[] = {{RTM_NEWROUTE, "RTM_NEWROUTE"},
{RTM_NEWRULE, "RTM_NEWRULE"},
{RTM_DELRULE, "RTM_DELRULE"},
{RTM_GETRULE, "RTM_GETRULE"},
+ {RTM_NEWNEXTHOP, "RTM_NEWNEXTHOP"},
+ {RTM_DELNEXTHOP, "RTM_DELNEXTHOP"},
+ {RTM_GETNEXTHOP, "RTM_GETNEXTHOP"},
{0}};
static const struct message rtproto_str[] = {
@@ -291,6 +294,14 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
return netlink_rule_change(h, ns_id, startup);
case RTM_DELRULE:
return netlink_rule_change(h, ns_id, startup);
+ case RTM_NEWNEXTHOP:
+ 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;
default:
/*
* If we have received this message then