diff options
author | Emanuele Altomare <emanuele@common-net.org> | 2021-03-05 23:12:00 +0100 |
---|---|---|
committer | Emanuele Altomare <emanuele@common-net.org> | 2021-03-05 23:12:00 +0100 |
commit | 3b1e3aab803ff2874ed23a1c19042b9510ecdf8f (patch) | |
tree | f2958ed73332d7c17ee2e99b80f83ade0691f0b7 /isisd/isis_redist.c | |
parent | Merge pull request #8188 from volta-networks/fix_ospf6_cost_flag (diff) | |
download | frr-3b1e3aab803ff2874ed23a1c19042b9510ecdf8f.tar.xz frr-3b1e3aab803ff2874ed23a1c19042b9510ecdf8f.zip |
isisd: added support for routemap match tag in redistribution
Now it's possible to filter routes redistributed by another protocol using tag
which comes from zebra daemon.
Example of a possible configuration:
```
!
ipv6 route fd00::/48 blackhole tag 20
ipv6 route fd00::/60 blackhole tag 10
!
interface one
ipv6 router isis COMMON
isis circuit-type level-1
!
interface two
ipv6 router isis COMMON
isis circuit-type level-2-only
!
router isis COMMON
net fd.0000.0000.0000.0001.00
redistribute ipv6 static level-1 route-map static-l1
redistribute ipv6 static level-2 route-map static-l2
topology ipv6-unicast
!
route-map static-l1 permit 10
match tag 10
!
route-map static-l2 permit 10
match tag 20
!
```
Signed-off-by: Emanuele Altomare <emanuele@common-net.org>
Diffstat (limited to 'isisd/isis_redist.c')
-rw-r--r-- | isisd/isis_redist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index 240be27cf..856c47b9b 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -219,7 +219,7 @@ static void isis_redist_ensure_default(struct isis *isis, int family) /* Handle notification about route being added */ void isis_redist_add(struct isis *isis, int type, struct prefix *p, struct prefix_ipv6 *src_p, uint8_t distance, - uint32_t metric) + uint32_t metric, const route_tag_t tag) { int family = p->family; struct route_table *ei_table = get_ext_info(isis, family); @@ -250,6 +250,7 @@ void isis_redist_add(struct isis *isis, int type, struct prefix *p, info->origin = type; info->distance = distance; info->metric = metric; + info->tag = tag; if (is_default_prefix(p) && (!src_p || !src_p->prefixlen)) { @@ -288,7 +289,7 @@ void isis_redist_delete(struct isis *isis, int type, struct prefix *p, * "always" setting will ignore routes with origin * DEFAULT_ROUTE. */ isis_redist_add(isis, DEFAULT_ROUTE, p, NULL, 254, - MAX_WIDE_PATH_METRIC); + MAX_WIDE_PATH_METRIC, 0); return; } |