]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: always set kernel table ID in FPM netlink
authorDuncan Eastoe <duncan.eastoe@att.com>
Thu, 8 Nov 2018 16:43:02 +0000 (16:43 +0000)
committerDuncan Eastoe <duncan.eastoe@att.com>
Wed, 8 Jul 2020 13:42:13 +0000 (14:42 +0100)
Ensure that rtm_table is populated with the kernel table ID.
Otherwise routes intended for a non-main table appear to the FPM
server as though they should be installed in the main table.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
zebra/zebra_fpm_netlink.c

index a18885ddb74e3f1b17ab41b431e6fbacaa1d4e3e..06e5fab444430c0e5a0ffe74b249835b2e5907e4 100644 (file)
@@ -279,7 +279,6 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
                                   rib_dest_t *dest, struct route_entry *re)
 {
        struct nexthop *nexthop;
-       struct zebra_vrf *zvrf;
 
        memset(ri, 0, sizeof(*ri));
 
@@ -287,9 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
        ri->af = rib_dest_af(dest);
 
        ri->nlmsg_type = cmd;
-       zvrf = rib_dest_vrf(dest);
-       if (zvrf)
-               ri->rtm_table = zvrf->table_id;
+       ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id;
        ri->rtm_protocol = RTPROT_UNSPEC;
 
        /*