| Age | Commit message (Collapse) | Author |
|
frrender: T9454: render FRR after a DHCP lease only once the commit completed
|
|
A lease event during a commit rendered FRR from the active configuration, which
the commit has not replaced yet. When the lease arrived after the commit's own
FRR render but before the commit finished, the stale render was applied and
nothing corrected it: moving a DHCP interface into a VRF left the VRF without
its default route.
The lease hook now starts the render detached and the render waits for the
running commit to complete. Detaching is required, as a commit stopping the
DHCP client waits for the release hook. Waiting is opt-in, as the commit itself
uses the same helper when it cannot reach the configuration daemon.
|
|
A boot whose configuration directory carries no pre/post-config hook scripts
copies them out of the running image. That copy named the image root twice,
because the image's squashfs is mounted at two paths and the variable holding
it kept both. One extra operand reached cp as a bare directory:
cp: -r not specified; omitting directory '/run/live/rootfs/<image>.squashfs'
The hook itself still landed, so nothing broke, but the copy reported failure
and was one word-split away from restoring the wrong file. It shows up where
the encrypted configuration volume stays shut, leaving the directory beneath
it empty.
The image root is now a single path, the two identical restore paths share one
implementation, and a copy that fails is logged rather than passing silently.
A missing hook is not escalated - on a first boot that would hand the system to
the upgrade-failure rollback.
|
|
A PPPoE session is restarted from within the commit that changes it and comes
back up milliseconds later, while that commit is still running. The hook which
then configures the interface reads the running configuration, which until the
commit finishes is still the one from before it. Everything the commit adds is
missing at that point: for an interface newly set to IPv6 autoconf the hook
disabled router advertisements and autoconfiguration on the link, and nothing
turned them back on. The link kept its link-local address and never received a
global one, until the next commit or reconnect.
Which interface is hit varies with the order the commit happens to process
them, so this surfaced as an intermittent failure.
The hook now waits for the commit to finish before reading the configuration.
|
|
Reconciling the FRR configuration after a DHCP lease event was requested from
the configuration daemon over the socket the commit pipeline uses. The daemon
serves one client at a time and assumes it is the running commit, so
the request either landed in the middle of the handshake which hands over the
configuration, or kept the daemon busy past the 10ms a commit waits for it.
Either way the commit fell back to running the conf-mode scripts directly.
Those never render FRR, only the daemon does, so the commit succeeded while FRR
kept the configuration rendered before it, until the next lease event.
A lease event now renders FRR in its own process, and a commit which could not
use the daemon renders FRR itself instead of skipping the reload. Both take the
same lock. A commit post-hook would remove the second case, for a full render
on every commit.
|
|
Harden the quote-aware '?' handler: quote readline buffer expansions and
write the DSR query to /dev/tty so help still works when stdout is redirected.
|
|
The '?' key is a raw readline binding (possible-completions), so a
literal question mark can never be typed into a value: readline
intercepts the keystroke before bash parsing begins and quoting cannot
protect it. Values like remote-group URLs with query strings get
silently corrupted ('.../blacklist?key=x' is stored as
'.../blacklistkey=x') with no error at any stage.
Rebind '?' to a bind -x handler that scans the line left of the cursor
for an open single/double quote or a pending backslash escape. Inside a
quote or escape the key self-inserts; otherwise it triggers the
standard help via a DSR round-trip (printf '\e[5n' with the terminal's
reply ESC [ 0 n bound to possible-completions), keeping the help path
and output identical to the previous behavior.
'set terminal key query-help enable' now restores the quote-aware
handler instead of the raw binding; 'disable' keeps its existing
self-insert override, which takes precedence at login as before.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
rsyslog reads the journal directly through imjournal (rsyslog.conf.j2 loads
it alongside imuxsock), so journald forwarding the same entries to /dev/log
delivers every non-kernel message twice. Both copies land in /var/log files
and go to every remote syslog target, differing only in PID formatting.
Ship the setting as a journald drop-in here rather than as a full
journald.conf in vyos-build, so the image carries only the settings VyOS
actually overrides. MaxLevelSyslog=debug comes across from that file; the
rest of it was commented-out systemd defaults.
Tested on a live 2026.09.11 router: with the drop-in in place a single
logger event produces one entry, remote targets receive one copy, and
kernel messages (imklog) and HAProxy's own socket are unaffected.
|
|
|
|
|
|
static: T9278: reconcile FRR config after every DHCP lease event
|
|
kernel.printk was set to "4 4 1 7" by the vyos-build image build hook
08-sysconf.chroot, which rewrote the Debian conffile /etc/sysctl.conf
during ISO assembly. Move the setting to where the remaining kernel.*
defaults live so the image build no longer has to touch a Debian
conffile and the hook can be dropped.
|
|
01-vyos-cleanup builds its route deletion with an explicit "vrf <name>". The ip()
wrapper caught that command and delroute() appended $VRF_OPTION again, so both
"ip route show" and "ip route del" ran with "vrf red vrf red". The FRR-down
kernel fallback had the same flaw.
Add vrf_option(), yielding $VRF_OPTION only when the arguments carry no "vrf"
token, and use it in both places. The append cannot simply be dropped, as
delroute() is also reached without a VRF. iptovtysh() parses single fields and
was never affected.
|
|
Each lease event emitted some fifteen daemon.info lines tracing internal steps
rather than recording a change. Add a "debug" level to logmsg(), silenced unless
/tmp/vyos.dhclient.debug exists, following the flag file convention used for FRR
and ifconfig. Demoting alone would not help, as journald shows all priorities by
default. Fifteen tracing messages move to debug; the sixteen recording an actual
change stay at info.
Also fix logmsg(): "warn" had no case arm although it is used, and the global
LOG_PRIO leaked the preceding call's priority. It is now local.
|
|
The default route derived from "interfaces <type> <ifname> address dhcp" is
rendered from the DHCP lease file, so it is only known at lease time. Until now
the sole runtime path into staticd was the one-shot vtysh injection in
dhclient-enter-hooks.d/03-vyos-ipwrapper. That injection races the FRR reload of
the very commit which started the DHCP client: dhclient runs with "-nw", thus the
commit does not wait for a lease, and when BOUND arrives mid-reload frr_alive()
can report FRR as down. The route is then installed into the kernel only and FRR
never learns about it. Nothing recovers afterwards, as FRRender.generate()
short-circuits on an unchanged configuration dict.
The self-healing re-render used by "protocols static route <prefix>
dhcp-interface" was gated on /tmp/static_dhcp_interfaces, which never lists plain
"address dhcp" interfaces - protocols_static.py does not even run on an
interface-only commit, as no config-mode dependency points to it.
Derive the DHCP dependent interface list from the configuration dict itself, both
for the default VRF and for every named VRF, and use it for FRR change
detection. Drop the interface list gate in the dhclient exit hook so any lease
event requests a re-render.
Also poll for the lease and for the rendered route in the affected smoketests
instead of relying on a fixed sleep.
|
|
kdump: T8868: Implement kernel crash dump support
|
|
Add new CLI subtree 'system option kdump' with memory reservation and
local dump path configuration. Also add 'show system kdump' and
'show system kdump dumps' operation mode commands to get
status of the configuration and list of dumps.
Extend 'show tech-support report' and 'generate tech-support archive' with
kdump service status, active config files and the recently kernel dump file.
|
|
|
|
Networking enabled
ROOT-CAUSE:
Some Azure VF interfaces miss to get renamed leading to errors in the downstream rules and mess up with the interface names.
Two main problematic scenarios were found which prohibited the renaming of a VF interface to vf_ethN:
1. Missing udev add event, when change event is received directly
2. A VF interface registering during rootfs stage
FIX:
Rule 63:
-Azure VF naming is now handled by a dedicated helper - vyos_vf_name to provide collision-free names for VF interfaces. The helper vyos_vf_name would be packaged into initramfs so the same behavior works in early boot and normal boot (a separate PR).
-Rule 63 is now guarded to prevent recursive renaming of VF interfaces.
Rule 65:
-A fallback VF rename path has been added for any leftover VF interfaces that were missed to be renamed due to some unexpected situation. Those VF interfaces are renamed prior to running persistent renaming of synthetic interfaces. This prevents VF interfaces from being considered as synthetic interfaces which may lead to errors in the flow of execution.
-Rule 65 is now guarded so generic persistent naming does not override VF names.
|
|
op-mode: T7250: restore image/file path completion for show/copy/delete file
|
|
The imagefiles comptype dispatched to _vyatta_image_file_complete, a function
that was never ported when the legacy vyatta-op bash completion script was
imported in commit 72a704d2e2 ("T6527: add legacy Vyatta interpreter files
still in us"), causing "Invalid command: [_vyatta_image_file_complete]" on
tab-completion.
Port the original vyatta-image-complete interpreter so completion of works
again as it did on VyOS 1.4.x.
|
|
netavark assigns the IPv6 gateway address to a container "pod-*" bridge
and immediately invokes aardvark-dns to bind its DNS listener to it. While
the address is "tentative" during Duplicate Address Detection, that bind()
fails with EADDRNOTAVAIL and container startup fails for any IPv6-enabled
network.
The kernel only skips DAD for an address if both "all" and the specific
interface's own accept_dad are disabled at the moment the interface is
created. A per-interface override is always either too late for a network's
first-ever container - as the network can only be created in-time and not
explicitly before starting the first container.
|
|
The default (coming from util-linux) fstrim.service in VyOS fails to
perform any trimming because it stops evaluating mount points after
reading /etc/fstab, which contains only overlay filesystems that
fstrim inherently ignores.
More info: https://vyos.dev/T9133
|
|
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.
|
|
Prefent ISO build issue:
Skipping overridden file '/usr/lib/udev/rules.d/40-usb_modeswitch.rules'.
Reading rules file: /etc/udev/rules.d/40-usb_modeswitch.rules
|
|
This fixes a (cosmetic) error which pops up in the logfiles:
40-usb_modeswitch.rules:4 ATTR key takes '==', '!=', or '=' operator, assuming '='.
It was introduced in commit 93406237d ("wwan: T8924: add UDEV configuration for
USB modeswitch")
|
|
Replace two-word "can not" / "Can not" with "cannot" across comments,
ConfigError messages, CLI help text, and op-mode output.
Standard SNMP MIB files under mibs/ are left unchanged.
|
|
When using WWAN interfaces, the Linux kernel selects configuration 2 by
default, but that does not work with ModemManager - configuration 3 (MBIM mode)
is a better choice.
Add UDEV rules for Huawei ME906s-158 and HP LT4132 which is a re-brand of
Huawei ME906s-158 to properly set MBIM mode on system startup.
|
|
Move from the out-of-tree to an in-tree variant of the OpenVPN DCO module. As
this was not available in the previous used LTS 6.6 Kernel it now is available
while we upgrade to Linux 6.18.
|
|
serial: T8211: fix symlink collisions for multi-port USB serial adapters
|
|
Remove unexpected `--force` option for the GeoIP update cron task
$ /usr/libexec/vyos/geoip-update.py --force
usage: geoip-update.py [-h] [--init]
geoip-update.py: error: unrecognized arguments: --force
|
|
Store the PROGRAM output in a temporary .BY_BUS ENV variable, then
reference it via %E{.BY_BUS} in the SYMLINK+= assignments. This
collapses the three duplicated PROGRAM pipelines into a single
invocation and removes the mixed usage of $result and %c.
No functional change: tested on MosChip MCS7840 (2x 4-port chips,
8 ports total), FTDI FT4232H, and Sierra EM7455 -- all symlinks
identical before and after, verified with udevadm test.
Reduces duplication; refactor suggested by
@copilot-pull-request-reviewer on PR #5113.
|
|
Multi-port USB serial adapters (e.g., MosChip MCS7840) where all ports
share the same USB ID_PATH create identical symlink names in
/dev/serial/by-bus/, causing only the last-enumerated port to be
accessible.
Split the existing catch-all rule for devices with .ID_PORT into two
cases:
- Port 0: keeps the base symlink name (backward compatible)
- Port 1+: appends pN suffix (e.g., usb0b1.4.1p1.0p1)
Devices where each port has a unique ID_PATH (e.g., FTDI FT4232H) and
single-port devices are unaffected.
|
|
vyos-netlinkd: T8047: replacement of netplugd
|
|
Fix typos and mistakes
No functional changes
|
|
Fix typos and mistakes in the commands and comments
No functional changes
|
|
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...
|
|
When dhclient renews/rebinds a lease, it calls "ip -4 addr flush dev
<interface>". This removes ALL IPv4 addresses, including static
addresses configured via VyOS (e.g., "set interfaces ethernet eth0
address 192.168.1.1/24").
The updated hook logic now intercepts the "ip -4 addr flush" command and replaces
it with a selective flush that only removes addresses marked as
"dynamic" by the kernel. DHCP-assigned addresses have the "dynamic" flag
set automatically.
|
|
Co-authored-by: Christian Breunig <christian@breunig.cc>
|
|
Fix cases where commit or IPsec up/down hooks fail if the VTI interface
has already been deleted or the `/tmp/ipsec_vti_interfaces` file does not
exist.
Changes:
- Return empty dict from `get_interface_config()` if it returns None to
avoid TypeError when accessing 'operstate' (vti_updown_db.py).
- Use `open_vti_updown_db_for_create_or_update()` in `vti‑up‑down` script so
the temporary interface tracking file is created automatically when
missing.
|
|
|
|
PrivateTmp needs to be disabled, otherwise we can not load the current
VyOS configuration to reconfigure the service automatically when certbot
runs.
|
|
T3680: protocols: add dhclient hooks for dhcp-interface static routes
|
|
frr: T7664: properly set log configuration during daemon startup
|
|
Solves the problem that vyos-configs in FRRender caches configuation and
DHCP changes are ignored.
* Add src/helpers/vyos-request-configd-update.py that requests vyos-configd
to update FRR configuration.
* Make dhclient hooks use it instead of calling protocols_static.py
* Make FRRender cache not only configuration but also DHCP gateways so
that is any of them changes, FRR configuration is updated
|
|
|
|
Related to commits:
* fca49413f - frrender: T7664: do not log unique-id in syslog messages
* c4c339fb5 - frrender: T7664: reduce log level to notifications during
normal operation
* 7ff824f44 - frrender: T7664: add "log timestamp precision 3" global option
|
|
The previous implementation used awk with a regex to extract the VRF name from
JSON data, relying on "(\w+)" to match the value. This broke for valid VRF
names containing hyphens or other non-word characters.
This update replaces the regex-based extraction with a jq query that reliably
parses the JSON structure, ensuring correct behavior regardless of VRF name
format. This also reduces parsing fragility by using a tool purpose-built for
JSON processing.
|
|
pki: T7908: certbot.timer must call CLI script to update certificates
|
|
|