ldpd: fix memory leak in ldp_acl_request()The imsg.data allocated by imsg_get() was not being freed
before returning. Reported by Coverity.
Signed-off-by: Michele Baldessari <michele@acksyn.org>
bgpd: remove unreachable code in rfapi_vtyThe variable opt is initialized to NULL just above, so the
condition can never be true. Reported by Coverity.
Signed-off-by: Michele Baldessari <michele@acksyn.org>
tests: Fix grpc-query.py to find micronetThis test script was being run without giving it access to micronet.
Modify the python script to correctly point at micronet.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd: When address change ensure DR changes too.When pim is coming up without any ip addresses on interfaces
yet, and pim_sock_reset is called, the pim primary address is being
set to the loopbacks ip address, additionally it is resetting the DR
to that address. When an address is finally set on the interface,
pim is recognizing the address but it is not recognizing the fact
that the DR should change as well when pim has not been enabled ye...
yang: Revision staements are not given in reverse chronological orderRevision stements are not given in reverse chronological order
Signed-off-by: y-bharath14 <y.bharath@samsung.com>
lib: add `show rcu` commandDisplay some more-or-less-helpful numbers on RCU operation.
Since only the logging code really uses RCU at this point, the display
being all zeroes is normal if no configuration changes to logging are
done.
Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
lib: export some statistics & state from RCU codeAllow retrieving some RCU state, both for consumption by the code
(rcu_local_state) as well as just debug/display (rcu_stats).
Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
lib: allow scheduling RCU items from RCU threadThe lock-free hash table code needs to use two RCU cycles for shrinking
its array, which means scheduling another RCU action from within the RCU
thread. Adjust the logic a little bit to allow doing that.
Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
lib: split `atomptr_*` out from `atomlist.h`Just a little reorg to split off unrelated things.
Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
tools: Add ldp commands to support bundle generationWhen LDP goes belly up there is no gathering of data
around what is going on there. Let's start with some
basic commands to gather data.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ldpd: Reuse port for ldpd sockets that set local portsCurrently ldpd is binding to a port/address locally for
some opened sockets. This is causing problems when
ldpd is killed and immediately restarted with the tcp
port getting `already in use` error messages. Modify
the code such that when a port is being specified, on
linux the ldpd code will tell the kernel to reuse the port
as well. This will clean up some test failures being
seen rarely in...
bgpd: Convert connection->last_sendq_ok to atomicThis value was/is being set in two different pthreads. Let's
consolidate examinination of this value to properly use
the right methodology for this.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib: Add time_t as an atomic type for FRRWe should add time_t as a atomic type for FRR, so
it can be handled correctly.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: last_sendq_time and last_sendq_warn are connection orientedThese two values attached to the peer are really values that should
be part of the connection. Move them over.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Do not fail zebra_nhg_check if skipped is not 0 on initialThe test is looking for the number of routes skipped before it does
a test that should cause routes to be skipped for installation.
Unfortunately it is treating anything non-zero as a failure.
Allow for non-zero values to be used as long as it is not -1
which indicates a failure.
Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
tests: Don't try to use identical rmacs in rare situationWe have this:
2026-02-13 22:24:54,781 INFO: topo: Step 2: Changing router MAC on tor-21
2026-02-13 22:24:54,781 INFO: topo: Changing vlan4001 MAC from 2e:d8:4f:14:f7:99 to 2e:d8:4f:14:f7:99
Notice how the rmac is changed from itself to itself. This is because the
code just blindly changes the last byte to a 99. If the last byte is already
99 then the test will just fail. Modify the code ...
Merge pull request #20668 from opensourcerouting/fix/trigger_conditional_adv_timer_for_static_redistributed_routesbgpd: Force sending conditional updates by ignoring MRAI timer
tests: Remove SRv6 SID check duplicationEach test is redefining the same `check_srv6_static_sids` helper
to verify expected SIDs in the RIB, which duplicates logic across
the file.
Move the helper to module scope and update all tests to call the
shared function so the check is defined once and reused
everywhere.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>