Merge pull request #6698 from deastoe/fpm-netlink-fixes

zebra: always set kernel table ID in FPM netlink
This commit is contained in:
Donald Sharp 2020-08-04 15:59:51 -04:00 committed by GitHub
commit 7dee45ef80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -300,6 +300,7 @@ struct rib_table_info {
struct zebra_vrf *zvrf;
afi_t afi;
safi_t safi;
uint32_t table_id;
};
enum rib_tables_iter_state {

View 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;
/*

View File

@ -133,6 +133,7 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf,
info->zvrf = zvrf;
info->afi = afi;
info->safi = safi;
info->table_id = tableid;
route_table_set_info(zrt->table, info);
zrt->table->cleanup = zebra_rtable_node_cleanup;