diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-03-31 08:34:14 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-03-31 08:39:52 +0200 |
commit | 49ecb8b807eb429d8d09afb07b1af5e1b5408be4 (patch) | |
tree | fcef093a68b2d13feb566d36b4ef64e7743b2849 /lib | |
parent | Merge pull request #10926 from donaldsharp/all_stop (diff) | |
download | frr-49ecb8b807eb429d8d09afb07b1af5e1b5408be4.tar.xz frr-49ecb8b807eb429d8d09afb07b1af5e1b5408be4.zip |
bgpd: Show `match script SCRIPT` in running config
Before:
```
route-map lua permit 10
exit
```
After:
```
route-map lua permit 10
match script rm
exit
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/routemap.h | 1 | ||||
-rw-r--r-- | lib/routemap_cli.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/routemap.h b/lib/routemap.h index 6c4916898..3ef60222b 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -276,6 +276,7 @@ DECLARE_QOBJ_TYPE(route_map); #define IS_MATCH_LOCAL_PREF(C) \ (strmatch(C, "frr-bgp-route-map:match-local-preference")) #define IS_MATCH_ALIAS(C) (strmatch(C, "frr-bgp-route-map:match-alias")) +#define IS_MATCH_SCRIPT(C) (strmatch(C, "frr-bgp-route-map:match-script")) #define IS_MATCH_ORIGIN(C) \ (strmatch(C, "frr-bgp-route-map:match-origin")) #define IS_MATCH_RPKI(C) (strmatch(C, "frr-bgp-route-map:rpki")) diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index 2685bd2d7..5597064d2 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -635,6 +635,11 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode, yang_dnode_get_string( dnode, "./rmap-match-condition/frr-bgp-route-map:alias")); + } else if (IS_MATCH_SCRIPT(condition)) { + vty_out(vty, " match script %s\n", + yang_dnode_get_string( + dnode, + "./rmap-match-condition/frr-bgp-route-map:script")); } else if (IS_MATCH_ORIGIN(condition)) { vty_out(vty, " match origin %s\n", yang_dnode_get_string( |