<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-11-07T21:19:52+00:00</updated>
<entry>
<title>netlinkd: T9388: keep the bearer retry bookkeeping under the lock</title>
<updated>2026-11-07T21:19:52+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-11-07T21:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=73ed49f91c1123cf758191af3c8f94e74b13d9df'/>
<id>urn:sha1:73ed49f91c1123cf758191af3c8f94e74b13d9df</id>
<content type='text'>
The pending bearer re-applies are updated by the dial and retry worker
threads while the reconcile loop drops interfaces which are gone,
disabled or disconnected. A worker finishing its attempt afterwards
wrote the entry back, so such an interface was tried once more.

All access now holds the WWAN lock, and a worker only updates an entry
which is still pending.
</content>
</entry>
<entry>
<title>wwan: T9388: apply a static bearer's address/gateway/DNS directly</title>
<updated>2026-11-07T21:19:52+00:00</updated>
<author>
<name>Adam Smith</name>
<email>adamsmith@yzguy.io</email>
</author>
<published>2026-10-08T01:20:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=9babe4468dec43d2df20488bacd3877d77c42b35'/>
<id>urn:sha1:9babe4468dec43d2df20488bacd3877d77c42b35</id>
<content type='text'>
QMI raw-ip modems get their address, gateway and DNS from ModemManager
as a "static" bearer instead of over a DHCP(v6) or Router Advertisement
exchange, so "address dhcp", "address dhcpv6" and "ipv6 address
autoconf" never produced a usable config and only worked for IPv4 by
accident.

Check the interface's connected bearer first. If its method for the
family is static, apply it directly; if it is dhcp, or there is no
bearer yet, fall through to the existing DHCP(v6) client / kernel SLAAC
unchanged.

- Address and DNS are applied from the bearer. DNS is registered with
  vyos-hostsd under the same dhcp-&lt;if&gt;/dhcpv6-&lt;if&gt; tags a real client
  uses. A DHCP(v6) client which was started while the bearer was still
  missing, including one which keeps restarting, is stopped before the
  settings are applied.
- The default route is rendered into FRR as a tag 210 static route, the
  same way a DHCP one is. WWANIf records the gateway of the bearer in
  /run/vyos-wwan, which the new get_wwan_router() filter reads, and a
  new block in staticd.frr.j2 fed by get_wwan_interfaces() renders the
  IPv4 and IPv6 default routes. Distance, no-default-route and VRFs
  behave as for DHCP, also for an interface without "address dhcp".
  frrender notices a gateway change, and WWANIf reconciles FRR with
  vyos-frr-render.py whenever the recorded gateway changes, the way the
  dhclient lease hook does, so op-mode reconnect is covered as well.
  The state is written atomically, as the renderer reads it
  concurrently.
- The address installed from the bearer is recorded in /run/vyos-wwan
  too. It is removed on reconnect, when the family is no longer
  configured and when the interface goes away, and nothing else on the
  interface is ever touched.
- vyos-netlinkd applies the bearer again after it re-dials a lost
  session, as the new session can come back with a different address or
  gateway. A DHCP client used to pick that up on its own. What a
  previous session left behind is dropped for a family the new one does
  not supply, the configured DHCP(v6) client or SLAAC is started for it
  as a commit would, and an incomplete result is retried on the
  following reconcile passes for a while.
- The bearer is picked by its connected status rather than bearers[0],
  and its config is polled briefly with wait_for() until it is no
  longer missing or a placeholder, since it can be populated slightly
  after the bearer reports connected.
</content>
</entry>
<entry>
<title>wwan: T9350: wait for the modem to become dialable, not merely listed</title>
<updated>2026-09-24T19:48:13+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-09-24T19:48:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=79738ffce99c0d4afd313355df8ca12200e6800c'/>
<id>urn:sha1:79738ffce99c0d4afd313355df8ca12200e6800c</id>
<content type='text'>
A modem is on the bus while still probing, so a dial could start too early and
leave the interface without a session until something re-dialled it.
</content>
</entry>
<entry>
<title>wwan: T9350: properly disconnect "disconnect interface wwanN"</title>
<updated>2026-09-24T15:27:27+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-09-24T15:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=112fb62b8b15653c0a26e0de56f326cd2d67da9b'/>
<id>urn:sha1:112fb62b8b15653c0a26e0de56f326cd2d67da9b</id>
<content type='text'>
Two things kept an operator disconnect from taking effect.

vyos-netlinkd re-dials every configured WWAN interface that has lost its
session. It cannot tell a session lost to RF signal loss from one that was
taken down on purpose, so the disconnect was undone on the next reconcile
pass, at most 30 seconds later:

  $ disconnect interface wwan0
  08:53:33 t+10s state=registered
  08:53:43 t+20s state=registered
  08:53:53 t+30s state=connected     &lt;- re-dialled
  08:54:03 t+40s state=connected

  vyos-netlinkd: WWAN interface wwan0 is not connected, re-dialling...
  vyos-netlinkd: Re-dialled WWAN interface wwan0

Record the intent instead of inferring it from the session state. op-mode
"disconnect" drops a marker in /run/vyos-wwan, which _reconcile_wwan() honours
and "connect" removes again. conf_mode removes it too, so a commit keeps
re-asserting the configured state - the marker only survives for as long as
nobody says otherwise, and never across a reboot.
</content>
</entry>
<entry>
<title>wwan: T9350: move session re-dial from cron into vyos-netlinkd</title>
<updated>2026-09-24T15:26:28+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-09-24T15:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=f148cc7c47a7fc6f81a06817de5f24e0836d0792'/>
<id>urn:sha1:f148cc7c47a7fc6f81a06817de5f24e0836d0792</id>
<content type='text'>
/etc/cron.d/vyos-wwan re-ran the conf_mode script every 5 minutes via
op-mode "connect interface wwanN" to re-establish a session lost to RF
signal loss. Re-entering conf_mode from cron is unsafe: the cron job knows
nothing about the boot commit or about a commit in flight, so when a tick
lands before the running config is populated, get_config() returns nothing
but {'ifname', 'deleted'} and apply() takes the teardown branch instead of
dialling. It then stops the DHCP clients, stops ModemManager and unlinks its
own cron file, leaving wwan0 down with no way to recover until the next
commit:

  CRON[1869]: (root) CMD (/usr/libexec/vyos/vyos-check-wwan.py)
  systemd[1]: Stopping DHCP client on wwan0...
  systemd[1]: Stopping Modem Manager...

This is timing dependent - it only bites when a */5 tick coincides with
boot - which is why it presents as an intermittently dead WWAN interface.

Move the re-dial into vyos-netlinkd, which already tracks these interfaces
for DHCP and already gates all of its work behind boot_configuration_complete()
and commit_in_progress2(). A re-dial can therefore no longer land on a
half-applied configuration. It also dials ModemManager directly rather than
re-entering conf_mode, so the teardown branch is no longer reachable from
the recovery path at all.
</content>
</entry>
<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>
</feed>
