summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-11 17:49:40 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-11 17:49:40 +0200
commite9eb40338b74b6266616017ef802cc3d2789ab89 (patch)
tree646834525321279c1ceabaee1b8712e6b0435c96 /src/conf_mode
parent9e5c6a935e2f552f790f843d4bd8e63e1a1d90ca (diff)
downloadvyos-1x-e9eb40338b74b6266616017ef802cc3d2789ab89.tar.gz
vyos-1x-e9eb40338b74b6266616017ef802cc3d2789ab89.zip
vxlan: 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).
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-vxlan.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-vxlan.py b/src/conf_mode/interfaces-vxlan.py
index 91682a540..84fe3dfc8 100755
--- a/src/conf_mode/interfaces-vxlan.py
+++ b/src/conf_mode/interfaces-vxlan.py
@@ -38,6 +38,7 @@ default_config_data = {
'ip_enable_arp_announce': 0,
'ip_enable_arp_ignore': 0,
'ip_proxy_arp': 0,
+ 'ipv6_accept_ra': 1,
'ipv6_autoconf': 0,
'ipv6_eui64_prefix': [],
'ipv6_forwarding': 1,
@@ -135,6 +136,11 @@ def get_config():
if conf.exists('ipv6 dup-addr-detect-transmits'):
vxlan['ipv6_dup_addr_detect'] = int(conf.return_value('ipv6 dup-addr-detect-transmits'))
+ # to make IPv6 SLAAC and DHCPv6 work with forwarding=1,
+ # accept_ra must be 2
+ if vxlan['ipv6_autoconf'] or 'dhcpv6' in vxlan['address']:
+ vxlan['ipv6_accept_ra'] = 2
+
# VXLAN source address
if conf.exists('source-address'):
vxlan['source_address'] = conf.return_value('source-address')
@@ -251,6 +257,8 @@ def apply(vxlan):
v.set_arp_ignore(vxlan['ip_enable_arp_ignore'])
# Enable proxy-arp on this interface
v.set_proxy_arp(vxlan['ip_proxy_arp'])
+ # IPv6 accept RA
+ v.set_ipv6_accept_ra(vxlan['ipv6_accept_ra'])
# IPv6 address autoconfiguration
v.set_ipv6_autoconf(vxlan['ipv6_autoconf'])
# IPv6 forwarding