diff options
author | Christian Breunig <christian@breunig.cc> | 2023-04-08 22:09:04 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-04-13 09:01:31 +0200 |
commit | 3f4de1390d6459cdd17dd1b6f22b1a3aec002671 (patch) | |
tree | 5091149b640ff7b064b87f2e1391f931ba5a7677 /src/conf_mode/protocols_static.py | |
parent | 8993298bc2c9d3e796d658dc71ba6ae6afedc4c3 (diff) | |
download | vyos-1x-3f4de1390d6459cdd17dd1b6f22b1a3aec002671.tar.gz vyos-1x-3f4de1390d6459cdd17dd1b6f22b1a3aec002671.zip |
T5150: initial implementation of new Kernel/Zebra route-map support
It is possible to install a route-map which filters the routes between routing
daemons and the OS kernel (zebra)
As of now this can be done by e.g.
* set protocols ospf route-map foo
* set protocols ospfv3 route-map foo
* set protocols bgp route-map foo
Which in turn will install the following lines into FRR
* ip protocol ospf route-map foo
* ipv6 protocol ospf6 route-map foo
* ip protocol bgp route-map foo
The current state of the VyOS CLI is incomplete as there is no way to:
* Install a filter for BGP IPv6 routes
* Install a filter for static routes
* Install a filter for connected routes
Thus the CLI should be redesigned to close match what FRR does for both the
default and any other VRF
* set system ip protocol ospf route-map foo
* set system ipv6 protocol ospfv3 route-map foo
* set system ip protocol bgp route-map foo
* set system ipv6 protocol bgp route-map foo
The configuration can be migrated accordingly. This commit does not come with
the migrator, it will be comitted later.
Diffstat (limited to 'src/conf_mode/protocols_static.py')
-rwxr-xr-x | src/conf_mode/protocols_static.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/conf_mode/protocols_static.py b/src/conf_mode/protocols_static.py index 3e5ebb805..3eabf24bc 100755 --- a/src/conf_mode/protocols_static.py +++ b/src/conf_mode/protocols_static.py @@ -105,17 +105,10 @@ def generate(static): def apply(static): static_daemon = 'staticd' - zebra_daemon = 'zebra' # Save original configuration prior to starting any commit actions frr_cfg = frr.FRRConfig() - # The route-map used for the FIB (zebra) is part of the zebra daemon - frr_cfg.load_configuration(zebra_daemon) - frr_cfg.modify_section(r'^ip protocol static route-map [-a-zA-Z0-9.]+', '') - frr_cfg.commit_configuration(zebra_daemon) - frr_cfg.load_configuration(static_daemon) - if 'vrf' in static: vrf = static['vrf'] frr_cfg.modify_section(f'^vrf {vrf}', stop_pattern='^exit', remove_stop_mark=True) |