summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--debian/compat2
-rw-r--r--debian/control2
-rwxr-xr-xsmoketest/scripts/cli/test_vrf.py18
-rwxr-xr-xsrc/conf_mode/vrf.py2
5 files changed, 22 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index e86ef4036..a31d037f2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -120,6 +120,7 @@ debian/vyos-1x-vmware
debian/vyos-1x-smoketest
debian/*.postinst.debhelper
debian/*.prerm.debhelper
+debian/*.postrm.debhelper
debian/*.substvars
# Sonar Cloud
diff --git a/debian/compat b/debian/compat
index ec635144f..f599e28b8 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index f28d28253..22fb86d49 100644
--- a/debian/control
+++ b/debian/control
@@ -104,7 +104,7 @@ Depends:
procps,
python3,
python3-certbot-nginx,
- python3-crypto,
+ python3-crypt | python3-pycryptodome,
${python3:Depends},
python3-flask,
python3-hurry.filesize,
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py
index 591630c46..f36d16344 100755
--- a/smoketest/scripts/cli/test_vrf.py
+++ b/smoketest/scripts/cli/test_vrf.py
@@ -119,6 +119,24 @@ class VRFTest(VyOSUnitTestSHIM.TestCase):
self.assertTrue(is_intf_addr_assigned(vrf, '127.0.0.1'))
self.assertTrue(is_intf_addr_assigned(vrf, '::1'))
+ def test_vrf_bind_all(self):
+ table = '2000'
+ for vrf in vrfs:
+ base = base_path + ['name', vrf]
+ self.cli_set(base + ['table', str(table)])
+ table = str(int(table) + 1)
+
+ self.cli_set(base_path + ['bind-to-all'])
+
+ # commit changes
+ self.cli_commit()
+
+ # Verify VRF configuration
+ tmp = read_file('/proc/sys/net/ipv4/tcp_l3mdev_accept')
+ self.assertIn(tmp, '1')
+ tmp = read_file('/proc/sys/net/ipv4/udp_l3mdev_accept')
+ self.assertIn(tmp, '1')
+
def test_vrf_table_id_is_unalterable(self):
# Linux Kernel prohibits the change of a VRF table on the fly.
# VRF must be deleted and recreated!
diff --git a/src/conf_mode/vrf.py b/src/conf_mode/vrf.py
index a39da8991..936561edc 100755
--- a/src/conf_mode/vrf.py
+++ b/src/conf_mode/vrf.py
@@ -141,7 +141,7 @@ def apply(vrf):
# set the default VRF global behaviour
bind_all = '0'
- if 'bind_to_all' in vrf:
+ if 'bind-to-all' in vrf:
bind_all = '1'
call(f'sysctl -wq net.ipv4.tcp_l3mdev_accept={bind_all}')
call(f'sysctl -wq net.ipv4.udp_l3mdev_accept={bind_all}')