Commit graph

38623 commits

Author SHA1 Message Date
David Lamparter 8418e57791
Merge pull request #17915 from mjstapp/compile_wshadow 2025-04-09 09:59:06 +02:00
Jafar Al-Gharaibeh 1d426d9961
Merge pull request #18614 from donaldsharp/bgp_memory_fixes_vrf_different_asn
bgpd: On shutdown free up memory leak found by topotest
2025-04-08 14:31:15 -05:00
Mark Stapp 27ba9956a1 lib,ripd: resolve clang SA warnings
Looks like there were a couple of SA warnings lurking; fix
them.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp e2515f7a4f tests: clean up variable-shadow warnings
Clean up -Wshadow warnings in unit-tests

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp edb330686d tools,pceplib,ospfclient: clean up variable-shadow warnings
Clean up -Wshadow warnings in these components

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 2998eeb0a5 pbrd,staticd,vrrpd: clean up variable-shadow warnings
Clean up -Wshadow warnings in three daemons

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 14b74d50ec sharpd: clean up variable-shadowing compiler warnings
Clean up -Wshadow in sharpd

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 660cbf5651 bgpd: clean up variable-shadowing compiler warnings
Clean up -Wshadow warnings in bgp.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp aece400f10 pimd: clean up variable-shadow warnings
Clean up -Wshadow warnings in pimd

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 7c98a27f3e zebra: clean up -Wshadow compiler warnings
Clean up variable-shadowing compiler warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp a2acd59afd ripng: clean up -Wshadow compiler warnings
Clean up -Wshadow compiler warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 536944dc53 lib,ripd: clean up -Wshadow compiler warnings
Clean up compiler warnings; convert a linklist macro
to an inline to resolve one; clean up a side-effect in isisd.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 9362c9b370 nhrpd: clean up -Wshadow compiler warnings
Clean up compiler warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 06614a803b pathd: clean up variable-shadow warnings
Clean up various variable-shadow warnings from -Wshadow

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp bf6e7c1da5 vtysh: clean up variable-shadow warnings
Clean up various variable-shadowing warnings from -Wshadow

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 7e1ed59d74 mgmtd: clean up -Wshadow warnings
Clean up various variable-shadow warnings in mgmtd.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 1378ebf640 ldpd: clean up warnings from -Wshadow
Clean up various variable-shadow warnings in ldpd.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp e49a2f9a53 eigrpd: clean up variable-shadow warnings
Clean up various warnings from -Wshadow in eigrp.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 2d32ad6aa9 bfdd: clean up -Wshadow warnings
Clean up various variable-shadow warnings in bfdd.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp e636398908 babeld: clean up -Wshadow warnings
Clean up various "shadow" warnings in babeld.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 5be982966c ospf6: clean up -Wshadow warnings
Clean up various "shadow" warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp 0561943a78 ospfd: clean up -Wshadow warnings
Clean up various "shadow" warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:27 -04:00
Mark Stapp e88f0a4778 isisd: clean up -Wshadow warnings
Clean up various "shadow" warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:26 -04:00
Mark Stapp 028872bf40 lib: fix -Wshadow warnings in the lib modules
Fix various "shadow" warnings in lib.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:26 -04:00
David Lamparter d683c4d8de lib: don't shadow _once in frr_with_mutex
The `_once` loop variable will result in a `-Wshadow` warning when that
is turned on.  Use `__COUNTER__` to give these variables distinct names,
like is already done with `_mtx_`.

(and because I touched it, clang-format wants it reformatted... ohwell.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-04-08 14:41:26 -04:00
Mark Stapp 05446a2961 configure: add -Wshadow option
Start exposing variable-shadowing warnings in all builds.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:26 -04:00
Jafar Al-Gharaibeh 4281d2b2c7
Merge pull request #18583 from zmw12306/source_port
babeld: check valid babel port
2025-04-08 12:28:58 -05:00
Jafar Al-Gharaibeh c7a45b1beb
Merge pull request #18598 from zmw12306/nhrp_nexthop
nhrpd: Add Hop Count Validation Before Forwarding in nhrp_peer_recv()
2025-04-08 11:28:57 -05:00
Donald Sharp b18c309015 bgpd: On shutdown free up memory leak found by topotest
This commit fixes two types of problems:

a) Avoidance of cleaning up memory when a instance is
hidden, thus causing it never to be freed on shutdown

b) In some instances bgp_create is called 2 times
for some code.  We are double allocating memory
and dropping it on the second allocation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-04-08 11:47:50 -04:00
Jafar Al-Gharaibeh 3510904f1d
Merge pull request #18526 from donaldsharp/pim_leakage
pimd: Fix memory leak on shutdown
2025-04-08 10:19:33 -05:00
Russ White 4d18be4faf
Merge pull request #18602 from LabNConsulting/chopps/doc-diagram
doc: add a diagram for config datastore cleanup on file reads
2025-04-08 11:12:05 -04:00
Russ White e9e9b2ba7e
Merge pull request #18585 from zmw12306/babel-knownae
babel: fix incorrect check in known_ae()
2025-04-08 10:55:24 -04:00
Russ White 9f59a2d05c
Merge pull request #18584 from zmw12306/babel_get_myid
babeld: Add a check to prevent all-ones case
2025-04-08 10:54:50 -04:00
Russ White 53a8868331
Merge pull request #18582 from zmw12306/route_lost
babeld: Fix starvation handling on route loss per RFC 8966 §3.8.2.1
2025-04-08 10:52:39 -04:00
Russ White 59b62ca788
Merge pull request #18581 from zmw12306/request_forward
babeld: Request forwarding does not prioritize feasible routes
2025-04-08 10:52:08 -04:00
Russ White 28d66ef7f1
Merge pull request #18547 from zmw12306/Hop-Count
babeld: Hop Count must not be 0.
2025-04-08 10:31:01 -04:00
Carmine Scarpitta 46a526568f
Merge pull request #18580 from raja-rajasekar/rajasekarr/check_sid_loc_block_beforehand
staticd: Avoid requesting SRv6 sid from zebra when loc and sid block dont match
2025-04-08 14:53:26 +02:00
Christian Hopps 3f6be74025 doc: add a diagram for config datastore cleanup on file reads
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-04-08 07:04:19 +00:00
zmw12306 7c87716482 nhrpd: Add Hop Count Validation Before Forwarding in nhrp_peer_recv()
According to [RFC 2332, Section 5.1], if an NHS receives a packet that it would normally forward and the hop count is zero, it must send an error indication back to the source and drop the packet.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-07 16:13:45 -04:00
Rajasekar Raja dbd9fed0b3 staticd: Avoid requesting SRv6 sid from zebra when loc and sid block dont match
Currently, when the locator block and sid block differs, staticd would
still go ahead and request zebra to allocate the SID which it does if
there is atleast one match (from any locators).

Only when staticd tries to install the route, it sees that the locator
block and sid block are different and avoids installing the route.

Fix:
Check if the locator block and sid block match before even requesting
Zebra to allocate one.

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
2025-04-07 10:34:07 -07:00
Donatas Abraitis 5e092d0e25
Merge pull request #18558 from spoignant-proton/master
bgpd: flowspec: remove sizelimit check applied to the wrong length field (issue 18557)
2025-04-07 03:27:02 +03:00
zmw12306 16a0458dbc babel: fix incorrect check in known_ae()
The known_ae() function accepts AE values up to 4, but the RFC only defines AE values 0-3.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-05 15:24:06 -04:00
zmw12306 e43dbc8fe1 babeld: Add a check to prevent all-ones case
A router-id MUST NOT consist of either all binary zeroes (0000000000000000 hexadecimal) or all binary ones (FFFFFFFFFFFFFFFF hexadecimal).

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-05 15:21:27 -04:00
zmw12306 6f88868f32 babeld: check valid babel port
Add checking for port == 6696.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-05 15:14:12 -04:00
zmw12306 8a8c43c891 babeld: Fix starvation handling on route loss per RFC 8966 §3.8.2.1
When all feasible routes to a destination are lost, but unexpired unfeasible routes exist, the node MUST send a seqno request to prevent starvation.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-05 14:26:32 -04:00
zmw12306 49f6e9a385 babeld: Request forwarding does not prioritize feasible routes
Modify route selection to check feasibility first, then fall back to non-feasible routes as per SHOULD requirement.

Signed-off-by: zmw12306 <zmw12306@gmail.com>
2025-04-05 14:00:41 -04:00
Mark Stapp 259ffe1dfe
Merge pull request #18562 from opensourcerouting/fix/bfd_down_if_established
bgpd: Treat the peer as not active due to BFD down only if established
2025-04-04 12:28:18 -04:00
Stephane Poignant 2cee5567bc
bgpd: flowspec: remove sizelimit check applied to the wrong length field (issue 18557)
Section 4.1 of RFC8955 defines how the length field of flowspec NLRIs is encoded.
The method use implies a maximum length of 4095 for a single flowspec NLRI.
However, in bgp_flowspec.c, we check the length attribute of the bgp_nlri structure against this maximum value, which actually is the *total* length of all NLRI included in the considered MP_REACH_NLRI path attribute.
Due to this confusion, frr would reject valid announces that contain many flowspec NLRIs, when their cummulative length exceeds 4095, and close the session.
The proposed change removes that check entirely. Indeed, there is no need to check the length field of each invidual NLRI because the method employed make it impossible to encode a length greater than 4095.

Signed-off-by: Stephane Poignant <stephane.poignant@proton.ch>
2025-04-04 13:29:02 +02:00
Donatas Abraitis 03c5ada020
Merge pull request #18567 from nabahr/proxy_init_disable
pimd: Initialize gm proxy to false
2025-04-04 02:10:35 +03:00
Mark Stapp bee5b36bbb
Merge pull request #18572 from opensourcerouting/fix/syntax_error_bgp_gr_notification
tests: Fix typo when configuring delayopen timer
2025-04-03 10:32:05 -04:00