diff options
| author | Duncan Eastoe <duncan.eastoe@att.com> | 2018-11-08 16:43:02 +0000 | 
|---|---|---|
| committer | Duncan Eastoe <duncan.eastoe@att.com> | 2020-07-08 14:42:13 +0100 | 
| commit | a7449876affaf475a458500d0bf407c40a6a56f4 (patch) | |
| tree | e6806668c36f1de70484f044d0f0d32b01f1fc22 /zebra/zebra_fpm_netlink.c | |
| parent | b62983cf98eb07350cd1120c3b0f32cf223d93f0 (diff) | |
zebra: always set kernel table ID in FPM netlink
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>
Diffstat (limited to 'zebra/zebra_fpm_netlink.c')
| -rw-r--r-- | zebra/zebra_fpm_netlink.c | 5 | 
1 files changed, 1 insertions, 4 deletions
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c index a18885ddb7..06e5fab444 100644 --- a/zebra/zebra_fpm_netlink.c +++ b/zebra/zebra_fpm_netlink.c @@ -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;  	/*  | 
