diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-03-11 10:46:25 -0400 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:37 -0400 |
| commit | fcc89a9cfc9fbff3eacc66bdf38ca9dd0f0664f6 (patch) | |
| tree | e4ab5243d8effda0af89441c19f298a47fd98ffe /zebra/rt_netlink.c | |
| parent | 3e0372d20e9880c135a8d7ab880cd4105c0222f1 (diff) | |
zebra: Parse in nexthop ID information from new routes
Add parsing code for nexthop object ID's when we get a
route. When we get a new route with the new kernel, it
will come with a nexthop ID and the nexthop full info.
We should just reference by ID if it exists and point
to the nexthop hash entry that matches it.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 98138d607b..03d1ee424c 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -342,6 +342,7 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, uint32_t mtu = 0; uint8_t distance = 0; route_tag_t tag = 0; + uint32_t nhe_id = 0; void *dest = NULL; void *gate = NULL; @@ -446,6 +447,9 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, if (tb[RTA_GATEWAY]) gate = RTA_DATA(tb[RTA_GATEWAY]); + if (tb[RTA_NH_ID]) + nhe_id = *(uint32_t *)RTA_DATA(tb[RTA_NH_ID]); + if (tb[RTA_PRIORITY]) metric = *(int *)RTA_DATA(tb[RTA_PRIORITY]); |
