summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-04-29 15:26:01 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-10-10 16:06:51 +0200
commit951745bdabeb4aeb63a968a683dc18df6a744091 (patch)
tree99c0347aa627507333545249c3c613c0c2901c76 /bgpd/bgp_zebra.c
parentMerge pull request #5129 from qlyoung/doc-yang-style (diff)
downloadfrr-951745bdabeb4aeb63a968a683dc18df6a744091.tar.xz
frr-951745bdabeb4aeb63a968a683dc18df6a744091.zip
bgpd: ability to export prefixes entries to a kernel table identifier
this table identifier can be used for policy routing. incoming entries are locally exported to that local table identifier. note that so that the user applies the new table identifier to all entries, the user should flush local tables first. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 8970e9d1d..c9dd0f4bc 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1228,6 +1228,11 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION);
+ if (info->attr->rmap_table_id) {
+ SET_FLAG(api.message, ZAPI_MESSAGE_TABLEID);
+ api.tableid = info->attr->rmap_table_id;
+ }
+
/* Metric is currently based on the best-path only */
metric = info->attr->med;
for (mpinfo = info; mpinfo; mpinfo = bgp_path_info_mpath_next(mpinfo)) {