diff options
| author | David Vølker <david@voelker.dk> | 2026-06-01 08:09:06 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-07-01 21:51:21 +0200 |
| commit | 0d3ac22b95cef90e7c54ef823c00bb59b935c158 (patch) | |
| tree | d4655b06e0c9976a5ecdeae87205e944e098c7b9 /src/conf_mode/interfaces_bridge.py | |
| parent | 063e007a5a8eac3bb9ad101206dc94734eeaa595 (diff) | |
| download | vyos-1x-0d3ac22b95cef90e7c54ef823c00bb59b935c158.tar.gz vyos-1x-0d3ac22b95cef90e7c54ef823c00bb59b935c158.zip | |
firewall: T8761: re-introduce VRF interface names in generated firewall config
This change re-implements the intended behaviour from T4180 aswell as from
T4506, it ensures that both the vrf-member interface aswell as the vrf itself
is added as an oifname -> meaning that traffic traversing and originating from
withing VyOS is matches outbound.
Changes done by c-po:
* re-sort dependency list to keep diff low
* vyos.configdict.is_vrf_changed() should return early and not carry
over the to-be return value
* keep common coding style (dict by . separation) in nftables-zone.j2
Co-authored-by: Christian Breunig <christian@breunig.cc>
Diffstat (limited to 'src/conf_mode/interfaces_bridge.py')
| -rwxr-xr-x | src/conf_mode/interfaces_bridge.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces_bridge.py b/src/conf_mode/interfaces_bridge.py index 6b574639e..5e24b8961 100755 --- a/src/conf_mode/interfaces_bridge.py +++ b/src/conf_mode/interfaces_bridge.py @@ -18,6 +18,7 @@ from sys import exit from vyos.config import Config from vyos.configdict import get_interface_dict +from vyos.configdict import is_vrf_changed from vyos.configdict import node_changed from vyos.configdict import is_member from vyos.configdict import is_source_interface @@ -129,6 +130,11 @@ def get_config(config=None): if 'static_arp' in bridge: set_dependents('static_arp', conf) + # Check vrf membership, to ensure firewall is updated + if is_vrf_changed(conf, ifname): + bridge.update({'vrf_changed': {}}) + set_dependents('firewall', conf) + bridge['vpp_ifaces'] = cli_ifaces_list(conf) return bridge @@ -233,7 +239,7 @@ def apply(bridge): if iface.startswith(('vxlan', 'wlan')) and interface_exists(iface) ] - if interfaces_need_update or 'static_arp' in bridge: + if interfaces_need_update or 'static_arp' in bridge or 'vrf_changed' in bridge: try: call_dependents() except ConfigError: |
