From cdfe017ea6bfc7d4306d9e73c44f40671f41fdbc Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 13 Oct 2019 12:30:24 +0200 Subject: Python/ifconfig: T1557: bugfix when configuring accept_ra on VLAN interfaces --- python/vyos/ifconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index cc214908a..8f5161d03 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -597,8 +597,8 @@ class Interface: sleep(5) # no longer accept router announcements on this interface - cmd = 'sysctl -q -w net.ipv6.conf.{}.accept_ra=0'.format(self._ifname) - self._cmd(cmd) + self._write_sysfs('/proc/sys/net/ipv6/conf/{}/accept_ra' + .format(self._ifname), 0) # assemble command-line to start DHCPv6 client (dhclient) cmd = 'start-stop-daemon --start --quiet --pidfile ' + \ @@ -634,8 +634,8 @@ class Interface: self._cmd(cmd) # accept router announcements on this interface - cmd = 'sysctl -q -w net.ipv6.conf.{}.accept_ra=1'.format(self._ifname) - self._cmd(cmd) + self._write_sysfs('/proc/sys/net/ipv6/conf/{}/accept_ra' + .format(self._ifname), 1) # cleanup old config file if os.path.isfile(self._dhcpv6_cfg_file): -- cgit v1.2.3