diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-10 23:37:47 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-11 11:39:23 +0300 |
| commit | 1c035c8c2c1bc57699697e7d35a631c9e6a1df55 (patch) | |
| tree | 9b30bc92148b571a44cc1dfc177827d2ea9ec8ab /lib/routemap_cli.c | |
| parent | 052fa79dd23d5d495ea81a962633fe896054bb37 (diff) | |
bgpd: Implement `match source-protocol` for route-maps
The main idea is to filter routes by matching source (originating) protocol
for outgoing direction. For instance, filter outgoing routes to an arbitrary
router that are static only. Or filter out only routes learned from RIP.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/routemap_cli.c')
| -rw-r--r-- | lib/routemap_cli.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index 419086c4c6..0ccc78e838 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -599,11 +599,14 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode, yang_dnode_get_string( dnode, "./rmap-match-condition/frr-zebra-route-map:ipv4-prefix-length")); - } else if (IS_MATCH_SRC_PROTO(condition)) { + } else if (IS_MATCH_SRC_PROTO(condition) || + IS_MATCH_BGP_SRC_PROTO(condition)) { vty_out(vty, " match source-protocol %s\n", yang_dnode_get_string( dnode, - "./rmap-match-condition/frr-zebra-route-map:source-protocol")); + IS_MATCH_SRC_PROTO(condition) + ? "./rmap-match-condition/frr-zebra-route-map:source-protocol" + : "./rmap-match-condition/frr-bgp-route-map:source-protocol")); } else if (IS_MATCH_SRC_INSTANCE(condition)) { vty_out(vty, " match source-instance %s\n", yang_dnode_get_string( |
