summaryrefslogtreecommitdiffstats
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-07-09 11:09:19 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-10-10 16:06:51 +0200
commit60ca3cc27d6d61e7a5a7921d00ed76ca42d44bd7 (patch)
tree68f3b3e301a519aa8fac267d4002e14cb43270d7 /zebra/zapi_msg.c
parentbgpd: withdraw fib entry on appropriate table identifier (diff)
downloadfrr-60ca3cc27d6d61e7a5a7921d00ed76ca42d44bd7.tar.xz
frr-60ca3cc27d6d61e7a5a7921d00ed76ca42d44bd7.zip
zebra: entries can be pushed in tables, under vrf netns backend
initially, vrf backend if vrf-lite, and a specific table identifier is associated to a vrf. here, with netns vrf backend, there is no specific table assigned to except default routing table. use the passed table_id parameter in zapi api, and apply it to the entry to be pushed in, or to be removed. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to '')
-rw-r--r--zebra/zapi_msg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index ffdc4dc51..b0488b755 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1425,7 +1425,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
re->flags = api.flags;
re->uptime = monotime(NULL);
re->vrf_id = vrf_id;
- if (api.tableid && vrf_id == VRF_DEFAULT)
+ if (api.tableid)
re->table = api.tableid;
else
re->table = zvrf->table_id;
@@ -1624,7 +1624,7 @@ static void zread_route_del(ZAPI_HANDLER_ARGS)
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
src_p = &api.src_prefix;
- if (api.vrf_id == VRF_DEFAULT && api.tableid != 0)
+ if (api.tableid)
table_id = api.tableid;
else
table_id = zvrf->table_id;