diff options
Diffstat (limited to 'src/conf_mode/interfaces_vti.py')
| -rwxr-xr-x | src/conf_mode/interfaces_vti.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces_vti.py b/src/conf_mode/interfaces_vti.py index b4652d727..916543caf 100755 --- a/src/conf_mode/interfaces_vti.py +++ b/src/conf_mode/interfaces_vti.py @@ -18,6 +18,9 @@ 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.configdep import set_dependents +from vyos.configdep import call_dependents from vyos.configverify import verify_mirror_redirect from vyos.configverify import verify_vrf from vyos.configverify import verify_mtu_ipv6 @@ -36,7 +39,12 @@ def get_config(config=None): else: conf = Config() base = ['interfaces', 'vti'] - _, vti = get_interface_dict(conf, base) + ifname, vti = get_interface_dict(conf, base) + + # Check vrf membership, to ensure firewall is updated + if is_vrf_changed(conf, ifname): + set_dependents('firewall', conf) + return vti def verify(vti): @@ -52,11 +60,18 @@ def apply(vti): # Remove macsec interface if 'deleted' in vti: VTIIf(**vti).remove() + + # run the dependents + call_dependents() + return None tmp = VTIIf(**vti) tmp.update(vti) + # run the dependents + call_dependents() + return None if __name__ == '__main__': |
