From 2fcbd6315077d0a9d8c5d261e768282485d31ce6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Jul 2022 11:40:41 +0200 Subject: ip: T4517: drop forwarding from CLI "system ip disable-directed-broadcast-forwarding" --- interface-definitions/system-ip.xml.in | 2 +- smoketest/scripts/cli/test_system_ip.py | 6 +++--- src/conf_mode/system-ip.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface-definitions/system-ip.xml.in b/interface-definitions/system-ip.xml.in index 75fe1c20a..e00dbf252 100644 --- a/interface-definitions/system-ip.xml.in +++ b/interface-definitions/system-ip.xml.in @@ -23,7 +23,7 @@ - + Disable IPv4 directed broadcast forwarding on all interfaces diff --git a/smoketest/scripts/cli/test_system_ip.py b/smoketest/scripts/cli/test_system_ip.py index 00fce654c..f71ef5b3f 100755 --- a/smoketest/scripts/cli/test_system_ip.py +++ b/smoketest/scripts/cli/test_system_ip.py @@ -38,12 +38,12 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase): self.assertEqual(read_file(all_forwarding), '0') def test_system_ip_directed_broadcast_forwarding(self): - # Test if IPv4 directed broadcast forwarding can be disabled globally, default is '1' - # which means forwarding enabled + # Test if IPv4 directed broadcast forwarding can be disabled globally, + # default is '1' which means forwarding enabled bc_forwarding = '/proc/sys/net/ipv4/conf/all/bc_forwarding' self.assertEqual(read_file(bc_forwarding), '1') - self.cli_set(base_path + ['disable-directed-broadcast-forwarding']) + self.cli_set(base_path + ['disable-directed-broadcast']) self.cli_commit() self.assertEqual(read_file(bc_forwarding), '0') diff --git a/src/conf_mode/system-ip.py b/src/conf_mode/system-ip.py index a0e1e0e50..0c5063ed3 100755 --- a/src/conf_mode/system-ip.py +++ b/src/conf_mode/system-ip.py @@ -65,7 +65,7 @@ def apply(opt): write_file('/proc/sys/net/ipv4/conf/all/forwarding', value) # enable/disable IPv4 directed broadcast forwarding - tmp = dict_search('disable_directed_broadcast_forwarding', opt) + tmp = dict_search('disable_directed_broadcast', opt) value = '0' if (tmp != None) else '1' write_file('/proc/sys/net/ipv4/conf/all/bc_forwarding', value) -- cgit v1.2.3