]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Parse in nexthop ID information from new routes
authorStephen Worley <sworley@cumulusnetworks.com>
Mon, 11 Mar 2019 14:46:25 +0000 (10:46 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Fri, 25 Oct 2019 15:13:37 +0000 (11:13 -0400)
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>
zebra/rt_netlink.c

index 98138d607b4ce098265ccfd18c2ae15923b5e411..03d1ee424c976a9b3ad0fbf105192ebce53331a0 100644 (file)
@@ -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]);