summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bgp.py
AgeCommit message (Collapse)Author
2026-06-29bgp: T6573: add input/output queue limit CLI commandsChristian Breunig
Add input-queue-limit and output-queue-limit CLI nodes to expose global FRR "bgp input-queue-limit" and "bgp output-queue-limit" commands via our CLI. Parameters control the maximum number of queued messages for all BGP peers during message parsing. FRR default is 10000 which we honor. Note that this is a global option and can only be set for the global/default BGP instance.
2026-06-26bgp: T8865: Reject `vni` sub-block in VRF l2vpn-evpn when ↵Oleksandr Kuchmystyi
`advertise-all-vni` is globally active When `advertise-all-vni` is configured in the global/default BGP instance, VyOS generated a `vni <id>` sub-block under each VRF BGP `address-family l2vpn evpn` context. This conflicts with advertise-all-vni: FRR already owns all kernel VNIs and returns `% Failed to create VNI` when frr-reload.py attempts to apply the VRF-level vni sub-block. FRR then performs an early exit from config processing, silently dropping the entire l2vpn evpn address-family for all subsequent VRF BGP instances.
2026-06-25Merge pull request #5272 from natali-rs1985/T5526Christian Breunig
bgp: T5526: Fix BGP neighbor validation not raising when interface does not exist
2026-06-25bgp: T9013: Add BMP source-interface supportNataliia Solomko
2026-06-25bgp: T5526: Fix BGP neighbor validation not raising when interface does not ↵Nataliia Solomko
exist Validation of interface-based BGP neighbors relied on checking physical interface existence, which silently skipped the check when interface didn't exist yet, letting invalid config reach FRR. Fix by checking whether the neighbor is not an IP address instead, and improve the error messages to show the correct command.
2026-06-20T8990: bgp: fix VPNv4/VPNv6 leaked routes flapping on every commitAlex Kudentsov
VRF route leaking via VPNv4/VPNv6 caused all imported (leaked) routes to be withdrawn and reinstalled on every commit - even commits unrelated to BGP, VRF or routing - briefly blackholing traffic that depends on them. Root cause: the BGP address-family template rendered the route-target using the "route-target vpn ..." alias. FRR accepts that alias on input but its config writer only ever emits the canonical "rt vpn ..." form. frr-reload.py diffs the generated config against FRR's running config line by line and has no normalisation for this, so the route-target lines never matched and were deleted and re-added on every reload. Re-applying the route-target runs FRR's vpn_leak_prechange()/postchange(), a non-atomic withdraw-all then reinstall-all of every leaked route. Emit the canonical "rt vpn" keyword so the rendered config round-trips through frr-reload unchanged. FRR also folds an identical import+export route-target into "both" (an order-sensitive, byte-identical match), so do the same to stay idempotent; reordered or differing lists stay split on both sides. Add test_bgp_33_vpn_route_target_idempotency covering both / identical export+import / asymmetric route-target, reading the generated FRR config (getFRRconfig/vtysh returns FRR's already-canonical form and cannot catch the alias).
2026-06-09bgp: T8223: Prevent `advertise-all-vni` in multiple BGP VRF instances ↵Nataliia Solomko
simultaneously FRR only allows one BGP instance to hold `advertise-all-vni` at a time (FRR issue #9405). When a default BGP instance is present it is always started before named VRF instances, so if a named VRF holds the flag FRR silently rejects it on every boot (regardless of default EVPN config), causing the running config to diverge from what is stored in VyOS. Enforce the following policy in verify(): - Default BGP instance may always hold `advertise-all-vni`. - A named VRF may hold it only when no default BGP instance exists. - Only one BGP instance (default or named VRF) may hold it at a time. The default BGP verify path additionally scans dependent VRFs so that adding or modifying the default BGP instance while a named VRF already holds the flag is caught even when the VRF node is not part of the current commit.
2026-05-21T8822: Add BFD strict mode for BGPViacheslav Hletenko
2026-05-11bgp: T8607: Add CLI support for BGP update-delay and establish-waitNataliia Solomko
2026-04-15smoketest: T8457: bgp link-state address familyKyrylo Yatsenko
2026-03-29bgp: T7338: Add support for "parameters as-notation <asdot|asdot+>"Robin Christ
We explicitly omit the "plain" option, as it is the implicit default in FRR We also do not want to add "plain" as VyOS default value and emit it by default as this makes the config a bit ugly (frr puts it in the router line so you get "router bgp <AS> as-notation plain"). Additionally, setting plain as default value and emitting it by default would break pretty much all BGP tests, as they commonly do self.getFRRconfig(f'router bgp {ASN}', stop_section='^exit') and getFRRConfig does a "^<content>$" match, which breaks when you add the "as-notation plain"
2026-02-14bgp: T7984: add CLI support for "neighbor <N> remote-as auto"Christian Breunig
FRR implemented a new know to learn the peers remote ASN from the BGP OPEN message from https://github.com/FRRouting/frr/pull/16345.
2026-01-21Merge pull request #4921 from hedrok/T7664-update-smoketest-scriptChristian Breunig
T7664: support FRR 10.5
2025-12-30T8133: BGP add local-rib feature for BMPViacheslav Hletenko
2025-12-30bgp: T7664: add 'no bgp reject-as-sets'Kyrylo Yatsenko
In FRR 10.5 'bgp reject-as-sets' became default (https://frrouting.org/release/10.5.0/): > BGP rejects AS_SET by default > Until 10.5.0, it was disabled by default, and since RFC 9774 was > published, we switched this on by default (to reject). Add 'no bgp reject-as-sets' when VyOS option reject_as_sets is not set.
2025-10-21T7948: always call setUp() and tearDown() base class methodsChristian Breunig
While working on task T7664 (FRR 10.4 upgrade), I identified the need for additional validation and safeguards around the FRR management daemon. The most appropriate place for this logic is in the setUp() and tearDown() methods of the smoketest base class, VyOSUnitTestSHIM. However, during implementation, it became apparent that test cases do not consistently invoke the base class's setup and teardown methods. This inconsistency complicates the process of capturing the FRR mgmtd PID at the start of a test and verifying that it remains unchanged by the end - a key step in detecting crashes or unexpected terminations (e.g., SIGSEGV) of the FRR management daemon during tests.
2025-10-16frr: T7664: drop BASH/SED implementation in smoketest getFRRconfig()Christian Breunig
Rathern then re-inventing the wheel by outself we import the frr-reload.py script and their read-in function of the current vtysh configuration.
2025-10-16frr: T7664: remove CSTORE_GUARD_TIME from smoketestsChristian Breunig
2025-10-06Revert "bgp: T7760: deprecate per bgp vrf instance system-as node"John Estabrook
This reverts commit d871fe9c4c65de87232802ed54b263c9b2824391.
2025-09-30smoketest: T7858: use pylint for our testcasesChristian Breunig
2025-09-30smoketest: T7858: make failfast main argument dynamicChristian Breunig
When smoketest debugging is enabled (by creating the file /tmp/vyos.smoketest.debug), all available smoketests will fail fast instead of running to completion. This helps reduce test time when something is broken or undergoing refactoring, as it avoids waiting for the full test suite to finish.
2025-09-23Merge pull request #4684 from c-po/bgp-vrf-system-asDaniil Baturin
bgp: T7760: remove per vrf instance system-as node
2025-09-14bgp: T6438: add solo option to peer-group config (#4706)l0crian1
- Added solo leafNode to peer-group config - Added solo.xml.i to reduce code duplication - Added solo option to peer-group smoketests
2025-09-09bgp: T7760: deprecate per bgp vrf instance system-as nodeChristian Breunig
Originating from the bug in T7665. To avoid potential issues down the line - and given that there's no compelling technical reason to retain the system-as CLI node under per-VRF BGP configuration, which cannot be achieved through alternative means - the maintainers have collectively decided to deprecate the following command: set vrf name <name> protocols bgp system-as <asn> Starting with VyOS 1.4.4, this CLI command will be considered deprecated. While it will still be accepted, it will no longer have any operational effect. A deprecation warning will be displayed at commit time, indicating that the BGP ASN from the global BGP configuration is now used instead. A migration script will handle the transition and perform the following actions: * Ensure a global BGP configuration exists; if not, initialize one. * Iterate over all configured VRFs to determine whether a BGP instance exists * For any insance, update the configuration to use the global system-as and apply the local-as ASN no-prepend replace-as option on all affected neighbors to preserve existing behavior. * If a neighbor is already configured with a local-as directive, that neighbor will be excluded from the migration process, as it already follows a custom configuration. * Add allowas-in per neighbor option. Required to not deny prefix received updates due to as-path contains our own global ASN.
2025-08-17bgp: T7708: correct logic for route-reflector-client peer_as checkcanoziia
2025-06-28T7591: remove copyright years from source filesChristian Breunig
The legal team says years are not necessary so we can go ahead with it, since it will simplify backporting. Automatically removed using: git ls-files | grep -v libvyosconfig | xargs sed -i -E \ 's/^# Copyright (19|20)[0-9]{2}(-[0-9]{4})? VyOS maintainers.*/# Copyright VyOS maintainers and contributors <maintainers@vyos.io>/g' In addition we will error-out during "make" if someone re-adds a legacy copyright notice
2025-06-20T7531: Add FRR no bgp ipv6-auto-ra optionfactor2431
2025-03-18bgp: T7157: Allow using route-maps for VRF route leaking in BGP (#4404)aapostoliuk
* bgp: T7157: Allow using route-maps for VRF route leaking in BGP Added the possibility of using route-map in route leaking. * Improve the constraint error message --------- Co-authored-by: Daniil Baturin <daniil@baturin.org>
2025-02-26T7118: Added the ability to redistribute NHRP routes to other protocolsaapostoliuk
Added the ability to redistribute NHRP routes to: OSPF BGP Babel RIP IS-IS
2025-02-13bgp: T7163: add CLI route-map and metric support for "redistribute table"Christian Breunig
* set protocols bgp address-family <ipv4-unicast|ipv6-unicast> redistribute table <n> [metric <n>] [route-map <name>]
2025-02-13bgp: T7161: fix IPv4/IPv6 unicast AFI "redistribute table" commandChristian Breunig
Re-use existing XML constraint added via commit 8f6246da6 ("xml: T7161: provide re-usable building block for alternative routing tables") and add handy CLI completion helper. FRRouting supports redistribution of multiple non-main tables, thus make this a multi node in addition, too.
2025-01-06configd: T6747: use one long-lived instance of FRRender (#4274)Christian Breunig
* smoketest: T6747: call wait after commit() only for FRR related tests Commit 702a60a8de28 ("smoketest: T6746: wait after commit() until frr-reload is no longer running") added a guard timeout for every commit executed via CLI smoketests. This commit changes the bahavior to only add the guard timeout for FRR related testscases. This improves the overall smoketest time. * configd: T6747: use one long-lived instance of FRRender Previously there was one FRRender() instance per config session. This resulted in re-rendering the FRR configuration every time a new config session was created. Example: vyos@vyos:~$ configure vyos@vyos# set interfaces dummy dum0 description foo vyos@vyos# commit vyos@vyos# exit vyos@vyos:~$ configure vyos@vyos# set interfaces dummy dum0 description bar vyos@vyos# commit vyos@vyos# exit In the past this caused a re-render of the FRR configuration as the delta check added in commit ec80c75d6776 ("frrender: T6746: only re-render FRR config if config_dict did change") evaluated to false, as it operated on a new instance of the FRRender class. With this change there is no FRR re-render, as there is nothing to update in FRR.
2024-12-30frr: T6746: additional improvements after 10.2 upgrade (#4259)Christian Breunig
* smoketest: T6746: add substring search in getFRRconfig() Some daemons (e.g. bgpd) have several nested substrings/sections like router bgp 100 address-family ipv4 unicast .. exit-address-family exit We can now use getFRRconfig() with the substring option to extract only address-family ipv4 unicast .. exit-address-family Making config validation more granular * frrender: T6746: only re-render FRR config if config_dict did change * frrender: T6746: fix naming glitch isis/eigrp * frrender: T6746: add --stdout option when running with debug flags * smoketest: T6746: remove unneeded commit_guard time It was an invalid workarround as the underlaying issue seems to be a race condition in CStore. The commit process is not finished until all pending files from VYATTA_CHANGES_ONLY_DIR are copied to VYATTA_ACTIVE_CONFIGURATION_DIR. This is done inside libvyatta-cfg1 and the FUSE UnionFS part. On large non-interactive commits FUSE UnionFS might not replicate the real state in time, leading to errors when querying the working and effective configuration. TO BE DELETED AFTER SWITCH TO IN MEMORY CONFIG
2024-12-16frr: T6746: reference common daemon definition in vyos.frrenderChristian Breunig
Do not use custom daemon definitions like bgpd - re-use them from e.g. vyos.frrender.bgp_daemon
2024-12-16frr: T6746: remove superseeded vyos.frr moduleChristian Breunig
2024-12-16frr: T6747: ensure there are no daemon leftovers in vtysh CLI after smoketestsChristian Breunig
2024-12-16frr: T6747: make daemon definitions re-usable for both conf-mode and smoketestsChristian Breunig
2024-05-07bgp: T6082: Allow the same local-as and remote-as in one peer groupkhramshinr
2024-04-04bgp: T5943: BGP Peer-group members must be all internal or all externalkhramshinr
2024-04-02T6196: Fixed applying parameters for aggregation in BGPaapostoliuk
Fixed using 'route-map', 'as-set' and 'summary-only' together in aggregation in BGP
2024-04-01Merge pull request #3212 from fett0/T6151fett0
bgp: T6151: Allow configuration of disable-ebgp-connected-route-check
2024-03-29bgp: T6106: Valid commit error for route-reflector-client option defined in ↵khramshinr
peer-group changed exception condition Improved route_reflector_client test
2024-03-29bgp: T6010: Allow configuration of disable-ebgp-connected-route-checkfett0
2024-03-26bgp: T6106: fix test and verify()khramshinr
2024-03-20bgp: T6106: Valid commit error for route-reflector-client option defined in ↵khramshinr
peer-group handle vtysh bgp error
2024-02-13Merge pull request #2987 from c-po/evpn-macvrf-sooChristian Breunig
bgp: T6032: add EVPN MAC-VRF Site-of-Origin support
2024-02-11bgp: T6032: add EVPN MAC-VRF Site-of-Origin supportChristian Breunig
In some EVPN deployments it is useful to associate a logical VTEP's Layer 2 domain (MAC-VRF) with a Site-of-Origin "site" identifier. This provides a BGP topology-independent means of marking and import-filtering EVPN routes originated from a particular L2 domain. One situation where this is valuable is when deploying EVPN using anycast VTEPs set protocols bgp address-family l2vpn-evpn mac-vrf soo
2024-02-10bgp: T6010: support setting multiple values for neighbor path-attributeChristian Breunig
2024-02-07bgp: T6024: add additional missing FRR featuresChristian Breunig
* set protocols bgp parameters labeled-unicast <explicit-null | ipv4-explicit-null | ipv6-explicit-null> * set protocols bgp parameters allow-martian-nexthop * set protocols bgp parameters no-hard-administrative-reset"
2024-01-14bgp: T591: add VPN nexthop support per address-familyChristian Breunig
set protocols bgp address-family ipv4-unicast nexthop vpn export <ipv4-address|ipv6-address> set protocols bgp address-family ipv6-unicast nexthop vpn export <ipv4-address|ipv6-address>