diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-11 17:44:48 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-11 17:44:48 +0200 |
commit | 0d1a6d2e936dcfd969bf1af706d7b9edf4282635 (patch) | |
tree | 2dfc277eafb6e44a28b4e976af3475d11f44ba45 /src/conf_mode/interfaces-bridge.py | |
parent | b3016754eb94ad419fb130bce25a29dd1917e4ec (diff) | |
download | vyos-1x-0d1a6d2e936dcfd969bf1af706d7b9edf4282635.tar.gz vyos-1x-0d1a6d2e936dcfd969bf1af706d7b9edf4282635.zip |
bridge: 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/interfaces-bridge.py')
-rwxr-xr-x | src/conf_mode/interfaces-bridge.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-bridge.py b/src/conf_mode/interfaces-bridge.py index c43fae78b..217ba95e1 100755 --- a/src/conf_mode/interfaces-bridge.py +++ b/src/conf_mode/interfaces-bridge.py @@ -48,6 +48,7 @@ default_config_data = { 'ip_enable_arp_accept': 0, 'ip_enable_arp_announce': 0, 'ip_enable_arp_ignore': 0, + 'ipv6_accept_ra': 1, 'ipv6_autoconf': 0, 'ipv6_eui64_prefix': [], 'ipv6_eui64_prefix_remove': [], @@ -197,6 +198,11 @@ def get_config(): and bridge['mac'] != BridgeIf(bridge['intf'], create=False).get_mac() ): bridge['ipv6_eui64_prefix_remove'] += bridge['ipv6_eui64_prefix'] + # to make IPv6 SLAAC and DHCPv6 work with forwarding=1, + # accept_ra must be 2 + if bridge['ipv6_autoconf'] or 'dhcpv6' in bridge['address']: + bridge['ipv6_accept_ra'] = 2 + # Interval at which neighbor bridges are removed if conf.exists('max-age'): bridge['max_age'] = int(conf.return_value('max-age')) @@ -302,6 +308,8 @@ def apply(bridge): br.set_arp_announce(bridge['ip_enable_arp_announce']) # configure ARP ignore br.set_arp_ignore(bridge['ip_enable_arp_ignore']) + # IPv6 accept RA + br.set_ipv6_accept_ra(bridge['ipv6_accept_ra']) # IPv6 address autoconfiguration br.set_ipv6_autoconf(bridge['ipv6_autoconf']) # IPv6 forwarding |