summaryrefslogtreecommitdiff
path: root/src/etc
AgeCommit message (Collapse)Author
6 hoursMerge pull request #5551 from c-po/T9454-frr-render-after-commitJohn Estabrook
frrender: T9454: render FRR after a DHCP lease only once the commit completed
5 daysfrrender: T9454: render FRR after a DHCP lease only once the commit completedChristian Breunig
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.
7 daysvyos-router: T9447: stop copying a directory when restoring the bootup hooksChristian Breunig
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.
8 dayspppoe: T9395: apply the configuration being committed when a session returnsChristian Breunig
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.
8 daysfrrender: T9368: reconcile FRR after a DHCP lease without the commit socketChristian Breunig
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.
2026-09-24cli: T9077: quote expansions and send DSR to /dev/ttyBrad Kollmyer
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.
2026-09-24cli: T9077: insert literal '?' inside quoted values instead of triggering helpBrad Kollmyer
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>
2026-09-17journald: T9183: stop forwarding journal entries to syslogRobert Navarro
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.
2026-09-10vbash: T7575: Trim trailing whitespacesarthurdev
2026-09-10vbash: T7575: Prevent re-declare readonly variablesarthurdev
2026-09-08Merge pull request #5446 from c-po/dhcp-static-route-flakinessDaniil Baturin
static: T9278: reconcile FRR config after every DHCP lease event
2026-09-06sysctl: T9283: stop low-level Kernel messages on the consoleChristian Breunig
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.
2026-09-06dhcp: T9278: do not append the VRF option twice to ip route commandsChristian Breunig
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.
2026-09-06dhcp: T9278: move DHCP client hook tracing to a gated debug levelChristian Breunig
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.
2026-09-04static: T9278: reconcile FRR config after every DHCP lease eventChristian Breunig
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.
2026-08-21Merge pull request #5325 from alexandr-san4ez/T8868-rollingJohn Estabrook
kdump: T8868: Implement kernel crash dump support
2026-08-20kdump: T8868: Implement kernel crash dump supportOleksandr Kuchmystyi
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.
2026-08-14T8329: Add support to handle Azure MANA interfaces in the udev naming rulesRitika Chopra
2026-08-14T8329: Fix interface naming for Azure VF interfaces with Accelerated ↵Ritika Chopra
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.
2026-08-11Merge pull request #5391 from c-po/comp-file-fixJohn Estabrook
op-mode: T7250: restore image/file path completion for show/copy/delete file
2026-08-10op-mode: T7250: restore image/file path completion for show/copy/delete fileChristian Breunig
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.
2026-08-07container: T7736: disable IPv6 DAD for netavark bridges to fix aardvark-dns raceChristian Breunig
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.
2026-07-28fstrim: T9133: skip /etc/fstab to properly identify devices to trimNacho Barrientos
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
2026-07-17utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd()Christian Breunig
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.
2026-07-10T9071: rename 40-usb_modeswitch.rules to 41-usb_modeswitch_wwan.rulesChristian Breunig
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
2026-07-09udev: T9071: fix invalid ATTR key assignmentChristian Breunig
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")
2026-06-16T8923: normalize "can not" to "cannot"Christian Breunig
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.
2026-05-25wwan: T8924: add UDEV configuration for USB modeswitchChristian Breunig
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.
2026-05-02Debian: T8147: remove out-of-tree OpenVPN DCO module - incl. in Kernel 6.18Christian Breunig
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.
2026-04-16Merge pull request #5113 from srnoth/T8211-multiport-serial-symlinksDaniil Baturin
serial: T8211: fix symlink collisions for multi-port USB serial adapters
2026-04-10T8459: Fix cron GeoIP update remove unexpected force optionViacheslav Hletenko
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
2026-04-08serial: T8211: refactor rule to reduce duplicationStephen Nothnagel
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.
2026-04-06serial: T8211: fix symlink collisions for multi-port USB serial adaptersStephen Nothnagel
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.
2026-04-02Merge pull request #4872 from c-po/vyos-netlinkdChristian Breunig
vyos-netlinkd: T8047: replacement of netplugd
2026-03-27T8410: Fix typos and mistakes for comments and messagesViacheslav Hletenko
Fix typos and mistakes No functional changes
2026-03-24T8410: Fix typos and mistakes for operational and configuration commandsViacheslav Hletenko
Fix typos and mistakes in the commands and comments No functional changes
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...
2026-03-19T8188: Preserve static IPv4 addresses flushed by dhclientNataliia Solomko
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.
2026-01-06T8153: pppoe: send RS for IPv6 autoconf on link-upMiaosen Wang
Co-authored-by: Christian Breunig <christian@breunig.cc>
2025-11-28ipsec: T8001: Commit fails removing VTI interface in IPsec configOleksandr Kuchmystyi
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.
2025-11-17T7992: remove unneeded references to OPAM in skel/.bashrcJohn Estabrook
2025-10-29pki: T7953: systemd certbot.service must not use PrivateTmpChristian Breunig
PrivateTmp needs to be disabled, otherwise we can not load the current VyOS configuration to reconfigure the service automatically when certbot runs.
2025-10-22Merge pull request #4622 from MattKobayashi/T3680Viacheslav Hletenko
T3680: protocols: add dhclient hooks for dhcp-interface static routes
2025-10-22Merge pull request #4804 from c-po/frr-initChristian Breunig
frr: T7664: properly set log configuration during daemon startup
2025-10-21T5811: Make static dhcp-interface routes robustKyrylo Yatsenko
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
2025-10-21T3680: protocols: add dhclient hooks for dhcp-interface static routesMatthew Kobayashi
2025-10-20frr: T7664: properly set log configuration during daemon startupChristian Breunig
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
2025-10-18T7941: fix DHCP client running in VRF with non-word charactersChristian Breunig
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.
2025-10-14Merge pull request #4790 from c-po/certbot-auto-renewDaniil Baturin
pki: T7908: certbot.timer must call CLI script to update certificates
2025-10-12dhcp6: T7882: Restart dhcp6c if PD is definedsarthurdev