summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-04 21:28:03 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-04 21:45:41 +0100
commitd8808f46955fdaed1d2e86ec10b078db66e4639e (patch)
treec5b039fabb49970e3d4b833d34608cc6b80d483b
parent39dfcfb5077a4024c454f9cd127fc1f65529f591 (diff)
downloadvyos-1x-d8808f46955fdaed1d2e86ec10b078db66e4639e.tar.gz
vyos-1x-d8808f46955fdaed1d2e86ec10b078db66e4639e.zip
vrf: T31: prior to the v4.8 kernel iif and oif rules are needed
.. we run on 4.19 thus this is no longer needed.
-rwxr-xr-xsrc/conf_mode/vrf.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index 91d8f8432..8036703f1 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -181,12 +181,11 @@ def apply(vrf_config):
table = vrf['table']
if not os.path.isdir(f'/sys/class/net/{name}'):
+ # For each VRF apart from your default context create a VRF
+ # interface with a separate routing table
_cmd(f'ip link add {name} type vrf table {table}')
+ # Start VRf
_cmd(f'ip link set dev {name} up')
- _cmd(f'ip -4 rule add oif {name} lookup {table}')
- _cmd(f'ip -4 rule add iif {name} lookup {table}')
- _cmd(f'ip -6 rule add oif {name} lookup {table}')
- _cmd(f'ip -6 rule add iif {name} lookup {table}')
# set VRF description for e.g. SNMP monitoring
with open(f'/sys/class/net/{name}/ifalias', 'w') as f: