summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-10-13 12:30:24 +0200
committerChristian Poessinger <christian@poessinger.com>2019-10-13 12:30:24 +0200
commitcdfe017ea6bfc7d4306d9e73c44f40671f41fdbc (patch)
tree4f5a2146b07c377f81969410c3673bed360ab3af /python
parentf9b55ed9ff55a0a080e62d201ad82327153c4a24 (diff)
downloadvyos-1x-cdfe017ea6bfc7d4306d9e73c44f40671f41fdbc.tar.gz
vyos-1x-cdfe017ea6bfc7d4306d9e73c44f40671f41fdbc.zip
Python/ifconfig: T1557: bugfix when configuring accept_ra on VLAN interfaces
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py8
1 files 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):