FRR Mirror
  1. FRR Mirror

FRR

Public
AuthorCommitMessageCommit dateIssues
Christian HoppsGitHubChristian Hopps
fe23b678b04MMerge pull request #21296 from enkechen-panw/static-route-metricstaticd: nexthop identity as path-list key, and per-route metric
Enke ChenEnke Chen
2f81a63d0f1tests: staticd: add topotest for static route metric featureAdd test_static_route_metric.py to tests/topotests/static_route_distance/ covering 7 scenarios × IPv4+IPv6 (14 test functions): 1. Metric replacement: changing a nexthop's metric removes the old-metric RIB entry and installs a new one at the new metric — no stale duplicate is left behind. 2. ECMP at same metric: two nexthops with identical metric are installed as a single ZAPI ADD wit...
Enke ChenEnke Chen
6163ed7d21etests: staticd: add topotests for per-route distance and tagAdd tests/topotests/static_route_distance/ covering: - Per-path administrative distance: AD replacement, ECMP with mixed ADs, lazy deletion keyed on nexthop identity, running-config correctness after each operation. - Per-path tag: basic tag assignment, independent tags per path, tag change in place, combined AD+tag change in one command, max-value-wins recalculation on deletion (delete...
Enke ChenEnke Chen
c0c1f0839b3tests: staticd: add topotests for apply_finish batching behaviorCover the four scenarios introduced by the apply_finish commit: 1. Tag + metric combined change in one transaction (tag_modify and metric_modify both fire, then apply_finish once). 2. Distance + metric combined change (distance_modify and metric_modify, then apply_finish once). 3. Tag + distance + metric all three in one transaction (all three per-leaf callbacks, then appl...
Enke ChenEnke Chen
799ec77c7dedoc: staticd: document administrative distance, metric, and tagAdd two new sections to doc/user/static.rst: 1. Administrative Distance and Metric: explains that static routes are grouped by (table-id, distance, metric) into path groups; nexthops sharing the same tuple form an ECMP set. Covers floating static routes (nexthops with different (distance, metric) tuples form separate path groups; all groups present in the RIB with the best-prefere...
Enke ChenEnke Chen
14a2414c59astaticd: add per-route metric as a non-key path-list attributeAdd metric as a non-key leaf attribute on the flat path-list entry, mirroring how distance is already handled after the schema refactoring. YANG ---- Add a metric leaf (uint32, default 0) to the staticd-prefix-attributes grouping. Metric is not part of the nexthop-identity key; changing it on an existing nexthop triggers a leaf MODIFY rather than a DESTROY+CREATE. Internal path grouping ----...
Enke ChenEnke Chen
653affcb528zebra: support metric as identity key for static routesAdd metric to the ZEBRA_ROUTE_STATIC identity checks in zebra so that two static routes at the same distance but different metrics are treated as distinct route_entries: - rib_compare_routes(): add a ZEBRA_ROUTE_STATIC metric check so that an incoming static route at a different metric is not treated as an update to the existing entry. - process_subq_early_route_delete(): extend the existi...
Enke ChenEnke Chen
0a0ef87d539tests: grpc: update path-list xpath and JSON fixtures to flat schemaThe staticd path-list key changed from (table-id, distance) to nexthop identity (table-id, nh-type, vrf, gateway, interface), with distance and metric as non-key attributes. Update test_grpc.cpp: - xpath predicate: replace path-list[table-id][distance]/frr-nexthops/ nexthop[nh-type]... with flat path-list[table-id][nh-type]... - Restructure all 13 path-list JSON blocks from the nested frr-...
Enke ChenEnke Chen
b36ebad54e9tests: mgmt: update path-list xpaths to flat schemaThe staticd path-list key changed from (table-id, distance) to nexthop identity (table-id, nh-type, vrf, gateway, interface), with distance becoming a non-key attribute. Update the hard-coded mgmt set-config xpaths in test_yang_mgmt.py: remove '[distance=1]/frr-nexthops/nexthop[' from each path-list predicate — nh-type, vrf, gateway, and interface are now direct keys on the path-list entry its...
Enke ChenEnke Chen
bb126962e80staticd: use nexthop identity as key in YANG schemaMotivation ---------- Static routes for a prefix can have multiple nexthops, but each nexthop must be unique for that prefix. The nexthop — identified by the combination of (table-id, nh-type, vrf, gateway, interface) — should therefore be the natural key in the YANG schema for static routes. The previous schema keyed path-list on [table-id, distance] with a nexthop-list nested below. Since ...
Donatas AbraitisGitHubDonatas Abraitis
bcbb38c2825MMerge pull request #21840 from enkechen-panw/default-orig-ipv4-nexthopbgpd: set mp_nexthop_len consistently in subgroup_default_originate()
Enke ChenEnke Chen
7c7549df7f0bgpd: set mp_nexthop_len consistently in subgroup_default_originate()d33a1dd19f added bgp_attr_set(&attr, BGP_ATTR_NEXT_HOP) to the IPv4 else branch of subgroup_default_originate(), but bgp_attr_default_set() still initializes mp_nexthop_len to IPV6_MAX_BYTELEN. For the IPv4 default-originate path, mp_nexthop_len should be IPV4_MAX_BYTELEN. This has no behavioral effect: every code path that consults mp_nexthop_len (BGP_ATTR_NEXTHOP_AFI_IP6, BGP_NEXTHOP_AFI_FRO...
Donatas AbraitisGitHubDonatas Abraitis
31b60984798MMerge pull request #21808 from kaffarell/auto-rt-deletion-fixbgpd: fix EVPN VRF auto RT deletion collision
Donatas AbraitisGitHubDonatas Abraitis
4b87ff40984MMerge pull request #21789 from enkechen-panw/aggr-counter-fix3bgpd: fix aggregate->count errors in ZAPI route notifications
Donatas AbraitisGitHubDonatas Abraitis
1a33978d193MMerge pull request #21816 from enkechen-panw/test-prefix-duptests: bgp_community_change_update: use receivedPrefixDup counter
Donatas AbraitisGitHubDonatas Abraitis
a541493e2d3MMerge pull request #21825 from cscarpitta/bgp_ls_reject_non_printable_charsbgpd: Reject BGP-LS node/link names containing non-printable characters
Donald SharpGitHubDonald Sharp
e1bdcc34756MMerge pull request #21828 from cscarpitta/bgp_ls_fix_test_configtests: Fix invalid ISIS max-lsp-lifetime in BGP-LS configs
Donald SharpGitHubDonald Sharp
b2c86049e36MMerge pull request #21829 from cscarpitta/bgp_ls_fix_invalid_escape_sequence_warningtests: Fix invalid escape warning in BGP-LS test
Carmine ScarpittaCarmine Scarpitta
0b40bbbdf18tests: Fix invalid escape warning in bgp_link_state test modulePytest reports a DeprecationWarning during collection of tests/topotests/bgp_link_state/test_bgp_link_state.py due to an invalid escape sequence in the module docstring. ``` test_bgp_link_state.py:6 /home/user/frr/tests/topotests/bgp_link_state/test_bgp_link_state.py:6: DeprecationWarning: invalid escape sequence '\ ' """ ``` Fix this by converting the module docstring to a raw string l...
Donatas AbraitisGitHubDonatas Abraitis
c63904bee3eMMerge pull request #21827 from cscarpitta/bgp_ls_fix_malformed_tlvs
Carmine ScarpittaCarmine Scarpitta
bcd7c419ffftests: Fix invalid ISIS max-lsp-lifetime in bgp_link_state configsThe bgp_link_state topotest ISIS configs set: max-lsp-lifetime 20 FRR accepts max-lsp-lifetime only in range 350-65535, so value 20 triggers warnings while loading the configs. Update r1/r2/r3/r4 configs to use: max-lsp-lifetime 350 Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine ScarpittaCarmine Scarpitta
614c5177d88bgpd: Treat malformed BGP-LS TLV as NLRI discard per RFC 9552RFC 9552 Section 5.1 states that when a malformed TLV is detected in a BGP-LS attribute, the router MUST handle the affected NLRI(s) as NLRI discard. The BGP session MUST NOT be reset. bgp_attr_ls() currently returns BGP_ATTR_PARSE_ERROR on TLV parse failure, which causes the caller (bgp_packet.c) to return BGP_Stop and reset the session. This behavior creates a remote BGP-session-reset vecto...
Carmine ScarpittaCarmine Scarpitta
3f10e1450b1bgpd: Reject BGP-LS node/link names containing non-printable charactersparse_node_name() and parse_link_name() accept arbitrary bytes from the wire, including embedded NUL bytes and control characters. A malicious peer can inject names such as "good\0bad", which: - Are silently truncated by strcmp/printf (only "good" is visible), allowing two distinct TLV values to appear identical in logs and VTY output (log spoofing). - Can bypass NLRI deduplication: bg...
Christian HoppsGitHubChristian Hopps
fa032c5e68bMMerge pull request #21253 from ashred-lnx/ashred/mgmtd-sampling-notify-selectmgmtd: add periodic notify mode with mode/mode_data and FE test support
Ashwini ReddyAshwini Reddy
9157410eba1mgmtd: add periodic notify mode with mode/mode_data and FE support - Added mode/mode_data to native NOTIFY_SELECT message. - Defined periodic vs on-change notify semantics in FE path. - Track periodic selectors separately from on-change selectors per session. - Added per-session periodic timer lifecycle for sampled oper snapshots. - Keep backend notify-select subscriptions on-change only. - Update FE client API/topotest encoding and docs for mode s...
Mark StappGitHubMark Stapp
adf04da31c6MMerge pull request #21769 from donaldsharp/rnh_problems_with_quick_interface_flappingzebra: Allow quick flaps of interfaces to be handled properly in next…
Donald SharpDonald Sharp
cea0c4fb742zebra: Allow quick flaps of interfaces to be handled properly in nexthop trackingCurrently if you have a quick series of events: interface down interface up This can end up resolving to no changes in the nexthop tracking if zebra is extremely busy. Modify zebra to notice that the connected/local/kernel routes have been removed and re-added and allow nexthop trackign to send a nexthop withdraw then a add to make things keep working. Signed-off-by: Donald Sharp <sharpd@nv...
Enke ChenEnke Chen
601b2da496etests: add test verifying aggregate->count with bgp suppress-fib-pendingAdd a topotest verifying that aggregate->count is correctly maintained when bgp suppress-fib-pending is enabled. Topology: r2 (AS 65002) --- r1 (AS 65001) r2 advertises 10.0.0.0/24 to r1. r1 has suppress-fib-pending enabled and aggregate-address 10.0.0.0/8 configured. The bug fixed (bgpd: fix aggregate->count errors in ZAPI route notifications): ZAPI_ROUTE_INSTALLED called bgp_aggregate_inc...
Enke ChenEnke Chen
1b25fbf924fbgpd: fix aggregate->count errors in ZAPI route notificationsAggregate counting tracks BGP RIB presence, not FIB installation state. bgp_aggregate_increment/decrement() must be called when routes enter or leave the BGP RIB — not in response to FIB events from zebra. When "bgp suppress-fib-pending" is configured, BGP registers for route notifications (ZEBRA_ROUTE_NOTIFY_REQUEST), and the ZAPI notification handlers violated this principle, causing two bug...
Donatas AbraitisGitHubDonatas Abraitis
6e751105d25MMerge pull request #21787 from enkechen-panw/aggr-counter-fix2bgpd: fix aggregate->count not decremented when route is dampened
Mark StappGitHubMark Stapp
4ce9b52d679MMerge pull request #21697 from donaldsharp/handle_more_corestests: Catch core dumps *after* teardown has completed
Donatas AbraitisGitHubDonatas Abraitis
b2689fee6e7MMerge pull request #21810 from donaldsharp/bgp_connection_peer_0_0_7Some more bgp connection rework
Donatas AbraitisGitHubDonatas Abraitis
cac416af7fbMMerge pull request #21811 from chiragshah6/zdevzebra: fix memleak in ip import-table rmap
Enke ChenEnke Chen
8d559e499c0tests: bgp_community_change_update: use receivedPrefixDup counterReplace the grep-based duplicate-update detection with the receivedPrefixDup counter from "show bgp neighbors json". This avoids reliance on log file content. Also explicitly enable bgp suppress-duplicates in x1/bgpd.conf, and disable debug bgp updates in both c1 and x1 configs. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
Donald SharpDonald Sharp
73f8c61b5edbgpd: Fix possible NULL deref in capability extended-nexthopSA is warning that peer as returned by peer_and_group_lookup_vty can be NULL. As such deref'ing the peer in bgp_capability_send is a no go. This used to work because the peer was checked for null in bgp_capability_send. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
e9ed54d4452bgpd: bgp_packet.c and bgp_fsm.c were using peer->connection in some wrong placesSimplify the code to fully make sure that the function is really connection oriented. Find and fix the places where peer->connection was being used on connection oriented functions Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
6677220e923bgpd: Modify functions to use `struct peer_connection`Modify functions in: bgp_packet.c bgp_attr.c bgp_open.c bgp_fsm.c bgp_ls.c to take a `struct peer_connection` vs a `struct peer`. Just more cleanup of the functions in what they are doing. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpGitHubDonald Sharp
2be4acf7828MMerge pull request #21812 from mjstapp/fix_gcc15_compile*: Support gcc 15
Mark StappMark Stapp
b90e034245fbfdd: changes to compile with gcc 15Changes to compile with gcc 15 Signed-off-by: Mark Stapp <mjs@cisco.com>
Mark StappMark Stapp
243a1b2cabdwatchfrr: changes to compile with gcc 15Changes to compile with gcc 15 Signed-off-by: Mark Stapp <mjs@cisco.com>
Mark StappMark Stapp
c1df3f33d4fbgpd: changes to compile with gcc 15Changes to compile with gcc 15 Signed-off-by: Mark Stapp <mjs@cisco.com>
Mark StappMark Stapp
c9eef340133lib: changes to compile with gcc 15Changes to compile with gcc 15 Signed-off-by: Mark Stapp <mjs@cisco.com>
Chirag ShahChirag Shah
fcf3707eec8zebra: fix memleak in ip import-table rmapFree the existing route-map name before inheriting new policy name. Assisted-by: Claude Signed-off-by: Chirag Shah <chirag@nvidia.com>
Donald SharpDonald Sharp
d2af097e123bgpd: Cleanup leaked memory on shutdown of rpkiWhen shutting down rpki, clean up the memory associated with the instance. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
93e363c3130tests: Add a `no rpki` command for testingThe `no rpki` command was not being tested at all in the bgp rpki code. Let's add a new test for it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
b40f817d415bgpd: Allow rpki to gracefully shutdown pthreads on stopThe bgp rpki code is seeing crashes on shutdown because the rtr mgr code is shutting down it's created pthreads and then joining them appropriately. When FRR then shutsdown we are seeing a situation where the pthread_join is crashing because it thinks it should do a join. Allow the bgp_rpki.c code to hook into the new frr_pthread_non_controlled_shutdown call to handle this situation better. ...
Donald SharpDonald Sharp
09361c7c115lib: Add a frr_pthread_non_controlled_shutdownAllow for pthreads to be cleaned up outside the scope of the frr_pthread infrastructure on shutdown. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
6ad85c5e1c6tests: Fix backtraces working properly for post topology teardownBacktraces were not being properly handled on the post topology teardown. Fix that. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald SharpDonald Sharp
c242950cde0tests: Catch core dumps *after* teardown has completedIf a test dumps core after it has been told to teardown, the topotests do not catch this problem. Modify the code to catch this situation. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Russ WhiteGitHubRuss White
8423db024c1MMerge pull request #21741 from donaldsharp/zebra_vrf_netns_ensure_interfaces_are_uptests: Fix zebra_vrf_netns topotest