<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/src/services/vyos-netlinkd, branch rolling</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/vyos/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-1x.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-1x.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/'/>
<updated>2026-06-22T19:33:50+00:00</updated>
<entry>
<title>vyos-netlink: T7965: only re-apply QoS configuration to individual interface</title>
<updated>2026-06-22T19:33:50+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-06-20T10:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=50ffc690fdeaaa30a9f353bc76fe87d748cc2e58'/>
<id>urn:sha1:50ffc690fdeaaa30a9f353bc76fe87d748cc2e58</id>
<content type='text'>
The previous vyos-netlinkd implementation for QoS policy re-apply was very heavy.
It conducted a full CLI validation and re-apply on every interface. Instead we
do not only re-apply the QoS configuration to the interface which has had an
address change detected by vyos-netlinkd.

This can be tested by checking "tc qdisc show" before disconnecting a PPPoE
interface and during/after reconnect. There will be no qdisc until the dynamic
interface has received an IP address - then the qdisc will be re-applied.
</content>
</entry>
<entry>
<title>vyos-netlink: T7965: re-apply QoS configuration on dynamic interfaces</title>
<updated>2026-06-20T20:56:18+00:00</updated>
<author>
<name>opswill</name>
<email>will@nixops.org</email>
</author>
<published>2026-05-27T09:19:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=2c6c98060ec2af764d4802ec58969399854eb140'/>
<id>urn:sha1:2c6c98060ec2af764d4802ec58969399854eb140</id>
<content type='text'>
Re-apply QoS after dynamic interfaces get addresses after connect/disconnect.
When PPPoE interfaces re-connect we need to re-do QoS settings.
</content>
</entry>
<entry>
<title>vyos-netlinkd: T8950: track per-interface operstate to suppress UP-to-UP DHCP restarts</title>
<updated>2026-06-03T17:19:54+00:00</updated>
<author>
<name>Robert Navarro</name>
<email>crshman@gmail.com</email>
</author>
<published>2026-05-31T20:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=3649dd09743e47700d36ecd25bffcd77dbb3cc3f'/>
<id>urn:sha1:3649dd09743e47700d36ecd25bffcd77dbb3cc3f</id>
<content type='text'>
_handle_dhcp_events() restarts dhclient/dhcp6c on every RTM_NEWLINK
that carries operstate=UP, regardless of whether the interface was
already UP.  Normal kernel events that re-notify UP without a preceding
DOWN (e.g. post-migration gratuitous-ARP, promiscuous-mode toggles)
trigger unnecessary DHCP restarts.  Each restart also creates a feedback
loop: dhclient-script runs "ip link set dev &lt;if&gt; up" during PREINIT,
which emits another RTM_NEWLINK(UP), which triggers another restart.
One seed event becomes 10+ restarts in 15 seconds.

Add a module-level dict tracking the last observed operstate per
interface.  Only proceed with the DHCP restart when the transition is
DOWN-to-UP or when no previous state is recorded (first boot / service
restart).  UP-to-UP re-notifications are suppressed with a LOG_DEBUG
message.

Validated on a production VyOS 2026.05.26-1327-rolling router: a
controlled KVM live migration after the patch produced zero DHCP
restarts (all UP-to-UP events suppressed), with no impact on normal
DOWN-to-UP DHCP recovery.
</content>
</entry>
<entry>
<title>vyos-netlinkd: T8781: try IPRoute.bind() RTNL subscription first (#5207)</title>
<updated>2026-05-18T15:34:47+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-05-18T15:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=51ab39e51bb925307c0f9ad1d905d450ceecc0f5'/>
<id>urn:sha1:51ab39e51bb925307c0f9ad1d905d450ceecc0f5</id>
<content type='text'>
Not all pyroute2 versions which ship IPRoute() support subscribing to RTNL
multicast groups. If subscribing fails, fallback to all messages.</content>
</entry>
<entry>
<title>vyos-netlinkd: T8781: use faster commit_in_progress2 with order O(1)</title>
<updated>2026-05-15T17:46:50+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-05-15T17:44:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=abd22ba6c3852fbf1002204a416b9de83e405caa'/>
<id>urn:sha1:abd22ba6c3852fbf1002204a416b9de83e405caa</id>
<content type='text'>
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").
</content>
</entry>
<entry>
<title>vyos-netlinkd: T8781: do not call commit_in_progress() for EVERY netlink message (#5199)</title>
<updated>2026-05-15T14:24:47+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-05-15T14:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=08542c03c0d1ab2c114966f6fbd4c2b7c3a45b4a'/>
<id>urn:sha1:08542c03c0d1ab2c114966f6fbd4c2b7c3a45b4a</id>
<content type='text'>
* vyos-netlinkd: T8781: do not call commit_in_progress() for EVERY netlink message

Signed-off-by: Fabrizzio Petrucci &lt;fabrizziopm@compumundohipermegared.one&gt;

* 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 &lt;fabrizziopm@compumundohipermegared.one&gt;
Co-authored-by: Fabrizzio Petrucci &lt;fabrizziopm@compumundohipermegared.one&gt;</content>
</entry>
<entry>
<title>T8831: smoketests: irregular PermissionError caused by systemctl stop</title>
<updated>2026-05-14T06:13:52+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-05-08T21:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=6df7ca2f61ce1aa8352e8dbb1fc6e9c5d6d42937'/>
<id>urn:sha1:6df7ca2f61ce1aa8352e8dbb1fc6e9c5d6d42937</id>
<content type='text'>
Failures appear during PPPoEIf.remove() -&gt; flush_addrs() -&gt; 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.
</content>
</entry>
<entry>
<title>vyos-netlinkd: T8486: fix high-cpu utilisation due to excessive CLI calls</title>
<updated>2026-04-12T07:03:25+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-04-12T07:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=4af2579d8a6f73f4fc61c0d30d09695f07bf6940'/>
<id>urn:sha1:4af2579d8a6f73f4fc61c0d30d09695f07bf6940</id>
<content type='text'>
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 &lt;jestabro@vyos.io&gt;
</content>
</entry>
<entry>
<title>vyos-netlinkd: T8047: replace netplugd</title>
<updated>2026-03-19T21:37:45+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2025-11-07T21:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=b84bdbf8dd25995aa564081632de6251ecf5ad4e'/>
<id>urn:sha1:b84bdbf8dd25995aa564081632de6251ecf5ad4e</id>
<content type='text'>
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 -&gt; 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 -&gt; eth3.10, state=DOWN, mac=00:50:56:b3:9d:8e
  vyos-netlinkd[12681]: RTM_NEWLINK -&gt; 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...
</content>
</entry>
</feed>
