summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-08-04 08:29:38 +0200
committerChristian Poessinger <christian@poessinger.com>2020-08-04 08:29:38 +0200
commitf5ecc5a40fcf07d9ad08864fbac710717330c255 (patch)
tree4fd19eb4163eca7cf2d965fa25dac7896952c6b7 /python/vyos
parent9e6cd018464fcf03a6930116ff5570f68a7c6c45 (diff)
downloadvyos-1x-f5ecc5a40fcf07d9ad08864fbac710717330c255.tar.gz
vyos-1x-f5ecc5a40fcf07d9ad08864fbac710717330c255.zip
dhcpv6-pd: T2741: support delegation on non existing interfaces
We must ignore any return code when invoking dhcpc6 initially. This is required to enable DHCPv6-PD for interfaces which are yet not up and running and my be started later by VyOS.
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/ifconfig/dhcp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/dhcp.py b/python/vyos/ifconfig/dhcp.py
index 5f99a0b7e..63224fc0f 100644
--- a/python/vyos/ifconfig/dhcp.py
+++ b/python/vyos/ifconfig/dhcp.py
@@ -103,7 +103,10 @@ class _DHCPv6 (Control):
render(self._config, 'dhcp-client/ipv6.tmpl',
self.options, trim_blocks=True)
- return self._cmd('systemctl restart dhcp6c@{ifname}.service'.format(
+
+ # We must ignore any return codes. This is required to enable DHCPv6-PD
+ # for interfaces which are yet not up and running.
+ return self._popen('systemctl restart dhcp6c@{ifname}.service'.format(
**self.options))
def delete(self):