summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-tunnel.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-11 18:46:18 +0200
committerGitHub <noreply@github.com>2020-05-11 18:46:18 +0200
commit6346a5f1a08e878e51213031ac33dcec08e368cd (patch)
tree7ace538f7568a8005f0e4f0987b27f0fd8dde20b /src/conf_mode/interfaces-tunnel.py
parent4ca0e563861f1d0ebf99afc012a9b95d9492e399 (diff)
parent49fc2c83adfa2c5dc169cae675f65c8e36a7d6c4 (diff)
downloadvyos-1x-6346a5f1a08e878e51213031ac33dcec08e368cd.tar.gz
vyos-1x-6346a5f1a08e878e51213031ac33dcec08e368cd.zip
Merge pull request #407 from jjakob/accept-ra-fix-T2449
T2449: set 'accept_ra=2' if 'address dhcpv6' or 'ipv6 address autoconf' is set
Diffstat (limited to 'src/conf_mode/interfaces-tunnel.py')
-rwxr-xr-xsrc/conf_mode/interfaces-tunnel.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-tunnel.py b/src/conf_mode/interfaces-tunnel.py
index f4cd53981..3e8653d58 100755
--- a/src/conf_mode/interfaces-tunnel.py
+++ b/src/conf_mode/interfaces-tunnel.py
@@ -251,6 +251,7 @@ default_config_data = {
'ip': False,
'ipv6': False,
'nhrp': [],
+ 'ipv6_accept_ra': 1,
'ipv6_autoconf': 0,
'ipv6_forwarding': 1,
'ipv6_dad_transmits': 1,
@@ -401,6 +402,11 @@ def get_config():
eff_addr = conf.return_effective_values('address')
options['addresses-del'] = list_diff(eff_addr, options['addresses-add'])
+ # to make IPv6 SLAAC and DHCPv6 work with forwarding=1,
+ # accept_ra must be 2
+ if options['ipv6_autoconf'] or 'dhcpv6' in options['address']:
+ options['ipv6_accept_ra'] = 2
+
# allmulticast fate is linked to multicast
options['allmulticast'] = options['multicast']
@@ -636,7 +642,7 @@ def apply(conf):
# set other interface properties
for option in ('alias', 'mtu', 'link_detect', 'multicast', 'allmulticast',
- 'ipv6_autoconf', 'ipv6_forwarding', 'ipv6_dad_transmits'):
+ 'ipv6_accept_ra', 'ipv6_autoconf', 'ipv6_forwarding', 'ipv6_dad_transmits'):
if not options[option]:
# should never happen but better safe
continue