diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-11 17:48:07 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-11 17:48:07 +0200 |
commit | d34a9412e09eacb9009eba9b0bbb57c9cd215543 (patch) | |
tree | 05688905bad94673ae07c7f735805aa9348a4b1a /src | |
parent | 115e6d152a72d1b9fe25838abda3d4ab639788a5 (diff) | |
download | vyos-1x-d34a9412e09eacb9009eba9b0bbb57c9cd215543.tar.gz vyos-1x-d34a9412e09eacb9009eba9b0bbb57c9cd215543.zip |
openvpn: 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')
-rwxr-xr-x | src/conf_mode/interfaces-openvpn.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py index bd69e4d4b..ea8e1a7c4 100755 --- a/src/conf_mode/interfaces-openvpn.py +++ b/src/conf_mode/interfaces-openvpn.py @@ -49,6 +49,7 @@ default_config_data = { 'encryption': '', 'hash': '', 'intf': '', + 'ipv6_accept_ra': 1, 'ipv6_autoconf': 0, 'ipv6_eui64_prefix': [], 'ipv6_eui64_prefix_remove': [], @@ -334,6 +335,11 @@ def get_config(): if conf.exists('ipv6 dup-addr-detect-transmits'): openvpn['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 openvpn['ipv6_autoconf'] or 'dhcpv6' in openvpn['address']: + openvpn['ipv6_accept_ra'] = 2 + # OpenVPN operation mode if conf.exists('mode'): openvpn['mode'] = conf.return_value('mode') @@ -1042,6 +1048,8 @@ def apply(openvpn): o = VTunIf(interface) # update interface description used e.g. within SNMP o.set_alias(openvpn['description']) + # IPv6 accept RA + o.set_ipv6_accept_ra(openvpn['ipv6_accept_ra']) # IPv6 address autoconfiguration o.set_ipv6_autoconf(openvpn['ipv6_autoconf']) # IPv6 forwarding |