summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-11 17:38:59 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-11 17:38:59 +0200
commit126f2a3bdd2b91d828b7057d6b53a96f957a23df (patch)
tree92448a149165a405c65dea91843ce60a981a37c2
parentcc9be6701d01bc5a229f339d21746bc9250972b5 (diff)
downloadvyos-1x-126f2a3bdd2b91d828b7057d6b53a96f957a23df.tar.gz
vyos-1x-126f2a3bdd2b91d828b7057d6b53a96f957a23df.zip
configdict: T2449: set accept_ra=2 if ipv6 address autoconf or dhcpv6 is set
To make SLAAC and DHCPv6 work when forwarding=1, accept_ra must be 2 (default for accept_ra is 1).
-rw-r--r--python/vyos/configdict.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 5ca369f66..7c1ecdd5d 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -348,6 +348,11 @@ def intf_to_dict(conf, default):
# If the interface does not exist, it could not have changed
pass
+ # to make IPv6 SLAAC and DHCPv6 work with forwarding=1,
+ # accept_ra must be 2
+ if intf['ipv6_autoconf'] or 'dhcpv6' in intf['address']:
+ intf['ipv6_accept_ra'] = 2
+
return intf, disable