summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)Author
2026-10-31interfaces: T3871: keep bridge and bond members discoverableChristian Breunig
An interface was passed over as soon as it had a master, which covers a VF datapath but also every bridge, bond and VRF member. Those are still their own card in their own slot, so the naming pass reported them as hardware which had not appeared, on any run made while they were in use. Skip only when the master is a device itself. That is what tells the accelerated path, which belongs to the interface it is enslaved to, apart from a member, which does not.
2026-10-31wwan: T3871: name a modem in the namespace the CLI readsChristian Breunig
Anything that was not wireless was named ethN, so an LTE module came up as an ethernet port: bound, working and invisible, because 'interfaces wwan' looks at wwanN and nothing else. Give it its own namespace, keyed on DEVTYPE, and drop what an earlier version filed under an ethernet name - that entry still matches the modem by path and would capture it again.
2026-10-31interfaces: T3871: leave wireless names to the configurationChristian Breunig
Every interface created on a radio carries that phy's address, so they are indistinguishable here. A name recorded against one of them was applied to whichever appeared next: configuring a second interface on a phy renamed it on top of the first, and the smoketests lost the interface they had just asked for. Nothing anchors a radio, and nothing needs to - wireless names come from 'physical-device'. Stop discovering them, stop writing a .link for them, and drop what an earlier version recorded so the entry and its file go on upgrade.
2026-10-31ethernet: T3871: leave a bond member's MTU alone while it is still enslavedChristian Breunig
Deleting the ethernet configuration of a member of a jumbo bond dropped that member to the default MTU while the bond went on using it at 9000. It stayed the active slave, so jumbo frames were discarded in both directions, small ones passed, and nothing was logged. A bond owns its members' MTU just as it owns their address - the ethernet path already refuses to let a member set either, and says so. The reset now waits, like the address, until the bond has released the port. The bonding smoketest covers both halves on a running system: while the member is enslaved it must keep the bond's address and MTU, and once the bond releases it, it must get its own address and the default MTU back.
2026-10-31interfaces: T3871: name a card by the card, not only by the slot it sits inChristian Breunig
The map now records which card each name sat on. A card moved to another slot keeps its name rather than leaving it behind for whatever turns up next, and the slot it vacated does not lend that name out. Where the map and the hardware disagree, the map wins: a card the store already knows, found in a name's slot, takes that name. Only a card nothing knows about, sitting in a slot on record, is treated as a replacement - the one case which can quietly move a configured address onto another cable.
2026-10-31interfaces: T3871: persist interface names on the first boot of a pre-built ↵Christian Breunig
image The check guarding that write looked for a marker which an activation script creates only after interface naming has already run. On a deployed qcow2 the marker is absent on the first boot, so nothing was recorded and the next boot named the hardware from scratch. Removing a card then moved every name below it onto the neighbouring port, taking that interface's address with it. Only an encrypted configuration has a volume which may still be locked, so ask about that instead - everywhere else the directory is already the persistent one.
2026-10-31ethernet: T3871: an ethernet interface belongs to the Kernel and can not be ↵Christian Breunig
deleted Every NIC used to carry a hw-id, which was enough to make its node exist. Without it a bare node is empty and never reaches the running configuration, so releasing a bond member looked exactly like a deletion: the port was torn down and left admin-down, with nothing left to bring it back. An ethernet interface is owned by the Kernel and - like 'lo' - outlives its configuration. Removing it now resets the port to the Kernel defaults and leaves the link up.
2026-10-31interfaces: T3871: remove the hw-id node and migrate its bindingsChristian Breunig
The node decides nothing now that the mapping store owns naming, and keeping it would leave two sources of truth free to disagree. Existing bindings are carried into the store by matching each hw-id against the permanent address of the hardware present, so a box named by an older release keeps exactly the names it had. Entries whose hardware is absent are skipped - the configuration may well originate from another machine. The hardware address of an interface is now read off the device rather than from the configuration.
2026-10-31interfaces: T3871: name interfaces from a slot-anchored mapping storeChristian Breunig
Names used to be derived from 'hw-id' in config.boot. A node carrying an address but no hw-id had to be matched to some NIC, and nothing available at boot could say which one - every heuristic could bind a configured address to the wrong physical wire. Naming authority moves to a mapping store binding a name to the slot the hardware occupies. The slot is the identity, so a replacement card in that slot is that interface again. The store renders systemd .link files, leaving udev to apply names as devices appear.
2026-10-30firewall: T9544: Fix fqdn match in prerouting raw rulesNataliia Solomko
A prerouting raw rule with a source or destination fqdn failed to commit: the rule referenced an FQDN set that was never declared, and the domain resolver never added addresses to it. Prerouting is now handled like the other hooks for both IPv4 and IPv6, so the set is created and filled with the resolved addresses. Added a smoketest covering both address families.
2026-10-29op-mode: T9496: verify secure-boot signature when using "add system image"Christian Breunig
On a system running with Secure Boot enabled, "add system image" installed the Linux Kernel of the new image without checking its signature. A Kernel not signed by an enrolled Machine Owner Key is rejected by shim, so the new image failed to boot. The Kernel of the new image is now verified against the enrolled MOK keys before anything is copied. If verification fails, the installation is aborted. The existing --force option overrides the check.
2026-10-29op-mode: T9538: fix interface check in reset wireguardChristian Breunig
The CLI existence check always looked up the interface under the argument name intf_name, but reset wireguard passes it as interface. The check therefore only tested whether any WireGuard interface existed: an unconfigured name slipped through and crashed with a KeyError, or the error message reported the interface as "None". The decorator now accepts the name of the argument carrying the interface, defaulting to intf_name, so existing callers are unchanged and reset wireguard reports the unconfigured interface by name.
2026-10-28T9529: wrapper should check result and raise error on nullJohn Estabrook
2026-10-27T9446: start reload commit-confirm timer after commit completesJohn Estabrook
In the case of reload (revert config instead of reboot), wait until commit has returned before starting the timer. This is to avoid collision and corruption when commit time > confirm interval. For tight coupling with the commit in question, refactor to start timer from post-commit script commit_revision. The case of reboot on unconfirmed commit-confirm is unchanged.
2026-10-27frrender: T9442: cache the FRR configuration only after it was appliedRuben Herold
The configuration was stored as the cached one before FRR had reloaded it. If the reload failed, or FRR was down, the next commit found the configuration unchanged, skipped the reload and reported success while FRR kept running the old configuration. Keep the rendered configuration aside and make it the cached one only after the reload succeeded. A render which does not reach the reload is not cached either. If the reload fails, FRR may run a part of the new configuration. The cache is dropped then, so even a return to the previous configuration reloads FRR. A reload that succeeds on the last try no longer raises an error.
2026-10-22Merge pull request #5583 from alexk37/T9484-vpp-netlink-rmem-maxViacheslav Hletenko
vpp: T9484: keep net.core.rmem_max at VPP's netlink buffer size
2026-10-22Merge pull request #5528 from alexandr-san4ez/T9336-rollingDaniil Baturin
syslog: T9336: Resolve remote FQDN targets within their configured VRF
2026-10-21vpp: T9484: keep net.core.rmem_max at VPP's netlink buffer sizeAlex Kudentsov
VPP requests a 256 MiB netlink receive buffer (nl-rx-buffer-size), but the kernel caps it at net.core.rmem_max, which VyOS sets to 2 MiB, so VPP gets 4 MiB. A large routing table over VPP interfaces can overflow it, and linux-cp then falls back to a full resync. Setting the sysctl from the CLI does not help at boot: system sysctl runs after vpp, so VPP has already opened its socket. - vpp.py raises net.core.rmem_max to the requested size before VPP is (re)started; a higher value is kept. - VPP re-opens its netlink socket on every resync and sizes it again, so system sysctl no longer applies a lower value while VPP is configured; it uses the required size and prints a warning. - When VPP is removed, vpp.py sets net.core.rmem_max back to the value from system sysctl, or to the default from sysctl.d, read with the new vyos.utils.system.sysctl_read_default(). - startup.conf.j2 takes nl-rx-buffer-size from the same value (default_resource_map) instead of its own constant.
2026-10-19Merge pull request #5573 from c-po/firewall-fixesChristian Breunig
firewall: T9474: multiple issues in rule processing (time based rules, fragment matching and failing commits)
2026-10-19Merge pull request #5578 from alexk37/bgp-t9450-resent-linesChristian Breunig
bgp: T9450: stop re-sending unchanged BGP lines to FRR on every commit
2026-10-19Merge pull request #5571 from c-po/wlb-fixesChristian Breunig
wlb: T9472: silent daemon failures, ignored options and connections broken by commits
2026-10-19Merge pull request #5574 from c-po/nat-fixesChristian Breunig
nat: T9475: commit failures and weight issue in load-balancing, translation issues for port-ranges
2026-10-19syslog: T9336: Resolve remote FQDN targets within their configured VRFOleksandr Kuchmystyi
Rsyslog resolves remote targets via the process's default routing context regardless of a per-remote 'vrf' setting, so a remote given as an FQDN fails to resolve when the only reachable DNS server lives in a non-default VRF. Changes: - `system_syslog.py` pre-resolves FQDN using VRF remotes at commit time and renders the resolved address instead of the raw FQDN. - `vyos-domain-resolver` collects VRF-bound FQDN targets from syslog and handles a resolved-address change for a syslog remote.
2026-10-19bgp: T9450: do not re-render the default conditional-advertisement timerAlex Kudentsov
The CLI's XML default for "bgp conditional-advertisement timer" (60) is always present in the config dict, so the line was rendered on every commit. FRR's own default is the same value (DEFAULT_CONDITIONAL_ROUTES_POLL_TIME, bgpd/bgp_conditional_adv.h) and bgp_config_write() never prints it back when the value equals the default, so frr-reload saw the line missing on every reload and sent it again, both in the default instance and in every VRF instance. Templates cannot query the XML definition while rendering, so frrender takes the value from the config defaults of "parameters conditional-advertisement" (conf.get_config_defaults) and adds it to the BGP dict as the key xml_default_conditional_advertisement_timer, for the global instance and for every VRF instance, the same pattern used for "bgp default local-preference" (T9404). bgpd.frr.j2 renders the line only when the configured value differs from xml_default_conditional_advertisement_timer, comparing both as integers so a timer entered as "060" is still treated as 60.
2026-10-18wwan: T9388: request an IPv6 bearer for autoconf without an address nodeAdam Smith
"ipv6 address autoconf" lives below "ipv6", so an interface which only gets its address by SLAAC has no "address" node at all. connect_options() only worked out the IP type when that node existed and fell back to ipv4 otherwise, which dialled an IPv4-only bearer and left the interface without any IPv6. Read the address list with a default instead. All other combinations of dhcp, dhcpv6 and autoconf give the same IP type as before.
2026-10-17nat: T9475: load-balance rules with a translation port failed to commitChristian Breunig
With load-balance backends, the translation port and any translation options were placed between "to" and the hash expression, e.g. "dnat to:80 numgen random ...". nft rejects that and the commit failed. The port is now part of every backend in the map and the options follow the map, so load-balanced port forwarding works.
2026-10-17nat: T9475: load-balance weights are relative to their sumChristian Breunig
The hash for load-balanced NAT rules was always taken modulo 100, while backend weights may add up to any value. With a sum below 100 some hash values had no backend in the map; commit only warned about it. The modulus is now the sum of all weights, so every hash value maps to a backend and weights act as relative shares. Rules whose weights add up to 100 render exactly as before, and the warning is dropped.
2026-10-17nat: T9475: keep translation port when translating to a prefixChristian Breunig
A translation prefix combined with a port range lost the port range when the rule had no matching source or destination address - the rule only said "snat prefix to <prefix>" and gave no warning. nft has no syntax for a prefix plus port range, so such rules now use the same map form as rules with an address, keyed on 0.0.0.0/0. This keeps the 1:1 prefix mapping and adds the port range.
2026-10-17firewall: T9474: keep time windows correct across UTC offset changesChristian Breunig
nft converts hour matches to UTC when the ruleset is loaded, using the offset of that moment. After a daylight saving change, or a change of the system time-zone, every hour window was off until the next firewall commit. - A new helper loads only the rules with an hour match again, in place, so sets such as dynamic, domain and GeoIP groups and all counters are kept. It is scheduled as a systemd timer for the next UTC offset change and re-arms itself; firewall and policy route commits arm or remove it. - Changing the time-zone re-runs firewall and policy route. The smoketest moves the clock to just before a change in Europe/Berlin and checks that the window is refreshed and a dynamic group entry survives. It only runs in the smoketest harness, as it changes the system clock.
2026-10-17firewall: T9474: keep fragment matching working alongside packet marksChristian Breunig
Fragments were detected by overwriting the whole packet mark with a fixed value before reassembly. Any later mark - a raw "set mark" or a policy route "set table" - replaced it, so "fragment match-frag" no longer matched, and marks already present on fragments were lost. Fragments now only get bit 31 of the mark, which no configurable firewall or routing policy mark uses: - fragment matching tests the bit, mark matching ignores it - firewall and policy route mark writers keep it - policy route and local-route ip rules mask it while fragments are routed - it is cleared after the forward and input filters, so later consumers such as QoS or IPVS see the original mark WAN load-balancing still overwrites the mark and keeps the previous behaviour for fragments.
2026-10-17firewall: T9474: match time windows crossing midnight in UTCChristian Breunig
Rules with a start and stop time were rendered as two separate hour comparisons. nft converts both to UTC when loading the ruleset, so a window crossing midnight in UTC never matched - e.g. 22:00-06:00 anywhere, or 01:00-02:00 on a system running in CEST. A start or stop time on its own had the same problem. Hours are now rendered as a single range, which nft turns into its complement when it wraps around midnight. A missing start or stop defaults to the beginning or end of the day.
2026-10-17wlb: T9472: keep marks of interfaces when others changeChristian Breunig
The routing table and mark of a WAN interface followed its position in the sorted interface list. Adding an interface which sorts before the others renumbered all of them. Existing connections still carried their old mark in conntrack and were routed into the wrong table - they broke. Every interface now keeps its table as long as it stays configured, new interfaces get the lowest free table. The assignment is dropped once WAN load-balancing is removed.
2026-10-17wlb: T9472: fix the inverted ttl health testChristian Breunig
The ttl test considered the interface healthy whenever ping failed. A dead uplink, where nothing answers, therefore stayed ACTIVE, while a target answering the ping marked the interface FAILED. The test now passes if the hop where the TTL runs out reports it, or if the target is closer and answers itself. If nothing answers within resp-time, the test fails.
2026-10-17wlb: T9472: honour limit threshold "above" on rulesChristian Breunig
"limit threshold above" was ignored. The rule always matched the traffic below the rate, the same as the default "below". With "above" the rule now matches the traffic exceeding the rate.
2026-10-17wlb: T9472: honour per-packet-balancing on rulesChristian Breunig
The renderer checked a key no CLI node produces, so "per-packet-balancing" had no effect and every rule balanced per flow only. With the option set, the rule no longer matches new connections only and every packet is balanced on its own.
2026-10-17wlb: T9472: make inbound-interface "any" match trafficChristian Breunig
"inbound-interface any", offered by completion, was rendered as an interface literally named "any" and matched no packet, so the rule never balanced anything. It now matches traffic entering on any interface except the WAN interfaces themselves. Matching those as well would also restore the routing mark on replies arriving from an ISP and send them straight back to that ISP.
2026-10-16Merge pull request #5560 from alexandr-san4ez/T9346-rolling_validation-fixChristian Breunig
policy: T9346: Allow dot in `prefix-list` and `prefix-list6` names
2026-10-16policy: T9346: Allow dot in `prefix-list` and `prefix-list6` namesOleksandr Kuchmystyi
VyOS 1.3 allowed a dot in `policy prefix-list` and `policy prefix-list6` names (pattern `^[-_a-zA-Z0-9.]+$`). The XML rewrite dropped the dot from the allowed characters, so a 1.3 configuration using such names can no longer be loaded or committed after an upgrade. FRR itself accepts the dot in prefix-list names.
2026-10-15dhcp-server: T9267: make client-class substring matching contains-anywhereRuben Herold
The Mikrotik configuration referenced by T9267 uses matching-type=substring, documented to match the value anywhere within the option string. This PR's "substring" match instead compared a fixed-length slice at a fixed byte offset (default 0) for exact equality - effectively an anchored prefix match, not a substring search - which does not reliably reproduce the ticket's own use case of picking a device model string (e.g. "T42S") out of a longer, variably-formatted hostname. Rebuild "hostname substring"/"vendor-class-id substring" on Kea's match()+lcase() instead of substring()==, so a configured value now matches anywhere in the option content and case-insensitively (options like vendor-class-id are not guaranteed to arrive in a fixed case). Drop the "offset" leaf together with it, since it has no remaining purpose once matching is no longer anchored to a fixed position, and there is no released behavior to preserve. Raw hex input and values containing a literal single quote are rejected for substring matching in verify(), since neither can be safely embedded into the generated Kea regular expression; exact "value" matching is unaffected and still accepts both. Reported by alexk37 in review of PR #5436.
2026-10-15dhcp-server: T9267: drop standalone substring "length" optionRuben Herold
The byte length compared by a hostname/vendor-class-id "substring" match is always derived from "value" for a meaningful equality test: a shorter length never matches (comparing fewer option bytes against the full value literal), and a longer one is silently clamped by Kea to the available bytes, turning what looks like a prefix match into an exact match of the whole remainder. There is no legitimate use for setting it independently of "value", so drop the leaf rather than add another verify() constraint around it. Reported by alexk37 in review of PR #5436.
2026-10-15dhcp-server: T9267: fix substring default length for odd hex digit countRuben Herold
The auto-computed substring length floored instead of rounding up, so a value like 0x1 produced substring(..., 0, 0) - an always-empty comparison that can never match, even though Kea itself pads 0x1 to the single byte 0x01. Round up to match Kea's own padding behavior. Found by CodeRabbit review on PR #5436.
2026-10-15dhcp-server: T9267: add client-class matching on hostname/vendor-class-idRuben Herold
Client classes could previously only match on relay agent information (Option 82). Add matching on the client-sent hostname (Option 12) and vendor class identifier (Option 60), each with an exact-value or substring form, so clients sharing a subnet can be told apart by e.g. device model without splitting the subnet into per-model pools. Also let a client-class deliver its own options (reusing the existing subnet/range option syntax), so a match can directly hand out a model-specific value such as a provisioning URL, independent of which pool the client's lease is drawn from.
2026-10-14Merge pull request #5550 from c-po/T9453-http-api-reload-readyJohn Estabrook
http-api: T9453: wait for the API server to be ready after a reload
2026-10-14Merge pull request #5478 from jestabro/rdep-interfaceDaniil Baturin
T7886: add a general method for verifying interface reverse dependencies
2026-10-14Merge pull request #5552 from c-po/T9456-container-kernel-overlayfsNataliia S.
container: T9456: use kernel overlayfs unless storage sits on overlayfs
2026-10-13Merge pull request #5546 from natali-rs1985/T9161-fix-smoketestJohn Estabrook
vpp: T9161: Fix smoketests failing on NICs capped at 1500 MTU
2026-10-12Merge pull request #5539 from c-po/T9253-anycast-gw-shared-macKyrylo Yatsenko
pseudo-ethernet: T9253: fix anycast-gateway with shared MAC on bridge VLANs
2026-10-11Merge pull request #5487 from ar0311/fix/T9332-geoip-src-dst-set-collisionChristian Breunig
firewall: T9332: fix GeoIP source/destination nftables set name colli…
2026-10-11Merge pull request #5545 from rnavarro/fix/ospf-metric-type-defaultChristian Breunig
ospf: T9448: do not render metric-type when it is the default
2026-10-11container: T9456: use kernel overlayfs unless storage sits on overlayfsChristian Breunig
Since T5003 every system was configured to mount container storage via fuse-overlayfs. This is only needed on live boot, where the storage sits on the root overlayfs and podman refuses native overlay. Installed systems keep it on the persistence partition and paid for a userspace FUSE process per container plus a round trip on every file operation. The mount program is now only configured when the storage is backed by overlayfs, otherwise the kernel overlay driver is used. Existing storage keeps using fuse-overlayfs: podman records that a mount program was used, as its layers store whiteouts in a format the kernel driver does not understand. Moving such a system to kernel overlayfs requires resetting the container storage and re-pulling all images.