summaryrefslogtreecommitdiff
path: root/src/services/vyos-netlinkd
AgeCommit message (Collapse)Author
2026-05-18vyos-netlinkd: T8781: try IPRoute.bind() RTNL subscription first (#5207)Christian Breunig
Not all pyroute2 versions which ship IPRoute() support subscribing to RTNL multicast groups. If subscribing fails, fallback to all messages.
2026-05-15vyos-netlinkd: T8781: use faster commit_in_progress2 with order O(1)Christian Breunig
Move to the re-implementation of the commit in progress check added in commit 002d45b70efd ("vyos.commit: T8781: move from O(n) to O(1) for commit_in_progress() checks").
2026-05-15vyos-netlinkd: T8781: do not call commit_in_progress() for EVERY netlink ↵Christian Breunig
message (#5199) * vyos-netlinkd: T8781: do not call commit_in_progress() for EVERY netlink message Signed-off-by: Fabrizzio Petrucci <fabrizziopm@compumundohipermegared.one> * vyos-netlinkd: T8781: restrict netlink subscription to link multicast group Bind IPRoute with RTMGRP_LINK only so route/rule/neighbour/address updates (e.g. full-table BGP) are not delivered to this socket. Add a match wildcard so unexpected message types do not raise MatchError and get logged as generic errors. --------- Signed-off-by: Fabrizzio Petrucci <fabrizziopm@compumundohipermegared.one> Co-authored-by: Fabrizzio Petrucci <fabrizziopm@compumundohipermegared.one>
2026-05-14T8831: smoketests: irregular PermissionError caused by systemctl stopChristian Breunig
Failures appear during PPPoEIf.remove() -> flush_addrs() -> set_dhcpv6(False), where disable uses self._cmd(f'systemctl stop ...'), which raises on any non-zero exit code of cmd(). PermissionError: [Errno 1] is misleading: cmd() raises OSError(exit_code, feedback); exit code 1 maps to PermissionError in Python 3, so logs point at "permissions" while the real signal is systemctl stop returned 1 (job failure, timeout, restart contention with Restart=always on dhcp6c@.service. Add a small systemd teardown helper stop_systemd_unit() validating the return codes from the "systemctl stop" calls.
2026-04-12vyos-netlinkd: T8486: fix high-cpu utilisation due to excessive CLI callsChristian Breunig
strace: Process 16362 attached [pid 16362] execve("/bin/cli-shell-api", ["/bin/cli-shell-api", "--show-active-only", "showConfig", "interfaces"], ...) = 0 [pid 16362] +++ exited with 0 +++ --- SIGCHLD ... strace: Process 16363 attached [pid 16363] execve("/bin/cli-shell-api", ["/bin/cli-shell-api", "--show-active-only", "showConfig", "interfaces"], ...) = 0 [pid 16363] +++ exited with 0 +++ --- SIGCHLD ... This would appear to be due to vyos-netlinkd calling op_mode_config_dict() more than is necessary: it can be called only when it may be applicable (this patch). Co-Authored-by: John Estabrook <jestabro@vyos.io>
2026-03-19vyos-netlinkd: T8047: replace netplugdChristian Breunig
Implementing a daemon that listens for netlink messages in Python was discussed for many years. This is a proof-of-concept implementation how we can listen for netlink messages and process them in Python. Python 3.10 minimum is required due to the use of case statements which mimics C-style switch/case instructions. Add example: set interfaces ethernet eth1 vif 21 address dhcp set interfaces ethernet eth1 vif 21 address dhcpv6 commit If network cable is unplugged: vyos-netlinkd[12681]: RTM_NEWLINK -> eth3.10, state=DOWN, mac=00:50:56:b3:9d:8e vyos-netlinkd[12681]: Stopping dhclient@eth3.10.service... vyos-netlinkd[12681]: Stopping dhcp6c@eth3.10.service... If cable is plugged back in: vyos-netlinkd[12681]: RTM_NEWLINK -> eth3.10, state=DOWN, mac=00:50:56:b3:9d:8e vyos-netlinkd[12681]: RTM_NEWLINK -> eth3.10, state=UP, mac=00:50:56:b3:9d:8e vyos-netlinkd[12681]: Restarting dhclient@eth3.10.service... vyos-netlinkd[12681]: Restarting dhcp6c@eth3.10.service...