From 3e560a2cc0b945e0d9e2b3639210d519983f44a2 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 29 May 2021 15:43:01 +0200 Subject: vpn: ipsec: T3093: drop obsolete cleanup_vti_interfaces() function --- src/conf_mode/vpn_ipsec.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') diff --git a/src/conf_mode/vpn_ipsec.py b/src/conf_mode/vpn_ipsec.py index ccbcd7f44..0c6151892 100755 --- a/src/conf_mode/vpn_ipsec.py +++ b/src/conf_mode/vpn_ipsec.py @@ -347,7 +347,7 @@ def apply(ipsec): call('sudo /usr/sbin/swanctl -q') else: call('sudo /usr/sbin/ipsec stop') - cleanup_vti_interfaces() + resync_l2tp(conf) resync_nhrp(conf) return @@ -360,9 +360,6 @@ def apply(ipsec): should_start = ('profile' in ipsec or ('site_to_site' in ipsec and 'peer' in ipsec['site_to_site'])) - if not should_start: - cleanup_vti_interfaces() - if not process_named_running('charon'): args = '' if 'auto_update' in ipsec: @@ -394,12 +391,6 @@ def get_vti_interface(vti_interface): return interface_conf return None -def cleanup_vti_interfaces(): - global conf - section = conf.get_config_dict(['interfaces', 'vti'], get_first_key=True) - for interface, interface_conf in section.items(): - call(f'sudo /usr/sbin/ip link delete {interface} type vti', stderr=DEVNULL) - def get_mark(vti_interface): global mark_base, mark_index if vti_interface not in marks: -- cgit v1.2.3