summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-09-28 06:46:28 +0200
committerGitHub <noreply@github.com>2026-09-28 06:46:28 +0200
commit19057cd2771e3a8f35b980244d4d859b84c68270 (patch)
tree85a3981374f328620bdeabc6ab6267a331b45650 /python
parent910247d4099f3a3fe9339c93926a21e9da93b226 (diff)
downloadvyos-1x-19057cd2771e3a8f35b980244d4d859b84c68270.tar.gz
vyos-1x-19057cd2771e3a8f35b980244d4d859b84c68270.zip
pppoe: T9356: do not fail commit when no Router Advertisement is received (#5504)
The Router Solicitation kicked off when an IPv6 autoconf PPPoE link comes up is best effort - the peer may answer late or not at all. rdisc6(8) then blocks for the duration of all retries and exits non-zero, which aborted the commit: FileNotFoundError: [Errno 2] failed to run command: rdisc6 --single --retry 3 pppoe1000 returned: Soliciting ff02::2 (ff02::2) on pppoe1000... Timed out. No response. exit code: 2 Run rdisc6(8) detached in a transient systemd unit, so neither the delay nor the exit code reaches the commit. The outcome is logged to the journal.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/pppoe.py14
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)