Page MenuHomeVyOS Platform

DHCPv6-PD lost after short WAN link drop: vyos-netlinkd leaves dhcp6c stopped, RELEASE not sent
Open, HighPublicBUG

Description

A router that gets its LAN prefix by DHCPv6 prefix delegation on the WAN uplink loses IPv6 on the LAN after a short carrier drop on that uplink and does not recover until reboot.
1.5.1 recovers every time.

Two measured triggers:

  1. Carrier drop of a few seconds on the PD uplink. vyos-netlinkd stops dhcp6c@ethX on DOWN and does not restart it on UP: no delegated prefix, the LAN RA carries only the ULA prefix, LAN clients lose their PD address.
    • rolling: stuck after the first drop (verdict=NOT-RETURNED tries=1 stuck=yes, client: no PD address, RA prefix ULA only); 1.5.1: recovered.
  2. 5 s down on the plain DHCPv4 uplink, then 5 s down on the PD uplink. dhcp6c's RELEASE fails (client6_send: transmit failed: Network is unreachable), so the upstream router keeps routing the prefix to the old link-local next hop, which no longer answers.
    • rolling: prefix not reachable after the event; 1.5.1: the RELEASE reaches the server, the route is rebuilt, the prefix returns.

Journal on rolling (trigger 2):

vyos-netlinkd: RTM_NEWLINK -> eth2, state=DOWN
vyos-netlinkd: Stopping dhcp6c@eth2.service...
dhcp6c: client6_send: transmit failed: Network is unreachable
vyos-netlinkd: RTM_NEWLINK -> eth2, state=UP
vyos-netlinkd: Restarting dhcp6c@eth2.service...

Cause
vyos-netlinkd (replaced netplugd, T8047) stops the DHCPv6 client with a synchronous systemctl stop (dhcp6c@.service ExecStop waits up to 5 s). While it is blocked, the link comes back; the UP event is read ahead into pyroute2's internal backlog by a get_links() lookup for an IPv6 address event, and select() on the socket never sees it, so the UP is not acted on until some later netlink event.

Suggested fix

  • Do not block the netlink loop on systemctl stop (run stop/start asynchronously or with --no-block), and
  • drain pyroute2's backlog (or use a separate socket for lookups) so a queued UP is always processed.

Details

Version
rolling, 1.5
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)