diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/ifconfig/pppoe.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/python/vyos/ifconfig/pppoe.py b/python/vyos/ifconfig/pppoe.py index eb217e12d..413c75023 100644 --- a/python/vyos/ifconfig/pppoe.py +++ b/python/vyos/ifconfig/pppoe.py @@ -17,6 +17,8 @@ from vyos.ifconfig.interface import Interface from vyos.template import is_ipv6 from vyos.utils.assertion import assert_range from vyos.utils.dict import dict_search +from vyos.utils.process import cmdl +from vyos.utils.process import get_wrapper from vyos.utils.network import get_interface_config from vyos.utils.network import mac2eui64 @@ -156,6 +158,14 @@ class PPPoEIf(Interface): if 'ipv6' in config: self._cmdl(['vtysh', '-c', 'conf t'] + vrf + ['-c', f'ipv6 route ::/0 {self.ifname} tag 210 {distance}']) - # kick RS when IPv6 is up. + # Kick a Router Solicitation when IPv6 is up. This is best effort - + # the peer may answer late or not at all if dict_search('ipv6.address.autoconf', config) is not None: - self._cmdl(['rdisc6', '--single', '--retry', '3', self.ifname]) + # systemd-run(1) only asks PID 1 to start the transient unit, so + # rdisc6(8) does not inherit our VRF context - it has to be entered + # inside the unit itself + wrapper = get_wrapper(config['vrf'] if 'vrf' in config else None, None) + description = f'VyOS IPv6 Router Solicitation on {self.ifname}' + cmdl(['systemd-run', '--quiet', '--collect', + f'--description={description}'] + wrapper + + ['rdisc6', '--single', '--retry', '3', self.ifname], self.debug) |
