<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-08-11T19:30:35+00:00</updated>
<entry>
<title>vyos-netlinkd: T9086: drain netlink during commit to avoid stale link-DOWN</title>
<updated>2026-08-11T19:30:35+00:00</updated>
<author>
<name>Brad Kollmyer</name>
<email>bradk@vitalsoft.com</email>
</author>
<published>2026-08-11T19:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=e746ba21878825c1f4837d2c5cf7316ac38e0d2b'/>
<id>urn:sha1:e746ba21878825c1f4837d2c5cf7316ac38e0d2b</id>
<content type='text'>
Original bug: while a commit held the lock, the daemon called sleep(1)
without reading the netlink socket. The pending message stayed queued
in the kernel buffer, so once the commit ended, a stale event (e.g. a
DOWN from a disable that had already been re-enabled) got processed as
if it were fresh - stopping dhclient on an interface that was actually
back UP.

The applied fix keeps only the two pieces that are actually
load-bearing:

1. Drain instead of sleep - while commit_in_progress2() is true, still
   call ipr.get() to read and discard any pending netlink messages, so
   nothing stale survives to be processed after the commit ends.
2. Reconcile on commit end - once the commit finishes, walk all
   matching interfaces, compare live sysfs operstate against the last
   state the daemon acted on (_iface_prev_operstate), and run the
   normal DHCP handler for any that disagree. This catches a real
   transition that happened only inside the drain window and would
   otherwise be silently lost.

Dropped from the original fix: an unconditional live-sysfs override
inside _handle_dhcp_events() that ran on every event, not just around
commits - redundant with reconcile, and risked discarding genuine fast
link flaps unrelated to any commit.

Co-authored-by: Christian Breunig &lt;christian@breunig.cc&gt;
</content>
</entry>
<entry>
<title>vyos-netlinkd: T9143: seed operstate cache at startup</title>
<updated>2026-07-30T03:58:13+00:00</updated>
<author>
<name>Ariel E</name>
<email>4097513+eirriel@users.noreply.github.com</email>
</author>
<published>2026-07-30T03:58:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=0afc97c1d2f2b901bd63b90c78703203f6e29f84'/>
<id>urn:sha1:0afc97c1d2f2b901bd63b90c78703203f6e29f84</id>
<content type='text'>
The state tracker starts empty whenever vyos-netlinkd starts, so the first same-state RTM_NEWLINK UP notification is treated as a transition and unnecessarily restarts DHCP.

Seed matching interface states from the kernel link dump after binding the rtnetlink socket. This preserves real DOWN-to-UP handling while suppressing the first redundant UP notification.
</content>
</entry>
<entry>
<title>utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd()</title>
<updated>2026-07-17T16:10:08+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-07-09T20:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=e0684c0c343835c7674a94424d847592511915b0'/>
<id>urn:sha1:e0684c0c343835c7674a94424d847592511915b0</id>
<content type='text'>
Complete the safer-subprocess migration started by the cmdl()/ifconfig
refactoring and convert every remaining vyos.utils.process.cmd() call site to
the list-based cmdl().

Drop the vyos.utils.process.cmd() implementation as it is no longer in use.
</content>
</entry>
<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>
</feed>
