summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vrf.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 991c5cb2c..a74b79317 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -213,9 +213,10 @@ def apply(vrf_config):
_cmd(f'sysctl -wq net.ipv4.tcp_l3mdev_accept={bind_all}')
_cmd(f'sysctl -wq net.ipv4.udp_l3mdev_accept={bind_all}')
- for vrf_name in vrf_config['vrf_remove']:
- if os.path.isdir(f'/sys/class/net/{vrf_name}'):
- _cmd(f'ip link delete dev {vrf_name}')
+ for vrf in vrf_config['vrf_remove']:
+ name = vrf['name']
+ if os.path.isdir(f'/sys/class/net/{name}'):
+ _cmd(f'ip link delete dev {name}')
for vrf in vrf_config['vrf_add']:
name = vrf['name']