zebra: Fix memory leak when SRv6 dyanmic SID allocation failsEnsure that the zebra_srv6_sid_ctx object is properly freed if
zebra_srv6_sid_alloc fails, to prevent memory leaks in the SRv6
dynamic SID allocation code path.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
tests: ripng_topo1: use vtysh_cmd() instead of bare vtysh commandsReplace direct cmd('vtysh -c "..."') calls with the framework's
vtysh_cmd() method. The bare vtysh commands will fail when FRR is
installed with a custom --prefix since vtysh is not in PATH.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
tests: rip_topo1: use vtysh_cmd() instead of bare vtysh commandsReplace direct cmd('vtysh -c "..."') calls with the framework's
vtysh_cmd() method. The bare vtysh commands will fail when FRR is
installed with a custom --prefix since vtysh is not in PATH.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
ripd: migrate ECMP route info lists to typesafe DLISTThe route_node info field stores a list of rip_info structures for ECMP
support. This change migrates it from the legacy linklist API to the
typesafe DLIST container API.
The rip_info structure now embeds a rip_info_list_item for intrusive
list linkage, and rp->info points to a dynamically allocated
rip_info_list_head structure.
Signed-off-by: Vincent Jardin <vjardin@free.fr>
ripd: migrate peer_list to typesafe SORTLIST_UNIQThe peer_list container in struct rip was using the legacy linklist API
with void pointer casts and runtime-configured comparison and deletion
callbacks. This migrates the container to use the typesafe SORTLIST_UNIQ
API which provides compile-time type safety and eliminates the need for
callback configuration.
The rip_peer structure gains an embedded rip_peer_list_item member for
intrusive lis...
ripngd: migrate ECMP route info lists to typesafe DLISTThe agg_node info field stores a list of ripng_info structures for ECMP
support. This change migrates it from the legacy linklist API to the
typesafe DLIST container API.
The ripng_info structure now embeds a ripng_info_list_item for intrusive
list linkage, and rp->info points to a dynamically allocated
ripng_info_list_head structure. A new memory type MTYPE_RIPNG_INFO_LIST
is defined for thes...
ripngd: migrate peer_list to typesafe SORTLIST_UNIQThe peer_list container in struct ripng was using the legacy linklist API
with void pointer casts and runtime-configured comparison and deletion
callbacks. This migrates the container to use the typesafe SORTLIST_UNIQ
API which provides compile-time type safety and eliminates the need for
callback configuration.
The ripng_peer structure gains an embedded ripng_peer_list_item member
for intrusi...
ripngd: migrate offset_list_master to typesafe SORTLIST_UNIQThe offset_list_master container in struct ripng was using the legacy
linklist API with void pointer casts and runtime-configured comparison
and deletion callbacks. This migrates the container to use the typesafe
SORTLIST_UNIQ API which provides compile-time type safety and eliminates
the need for callback configuration.
The ripng_offset_list structure gains an embedded ripng_offset_list_item
...
ripd: migrate offset_list_master to typesafe SORTLIST_UNIQThe offset_list_master container in struct rip was using the legacy
linklist API with void pointer casts and runtime-configured comparison
and deletion callbacks. This migrates the container to use the typesafe
SORTLIST_UNIQ API which provides compile-time type safety and eliminates
the need for callback configuration.
The rip_offset_list structure gains an embedded rip_offset_list_item
member...
zebra: Fix memory leak when SRv6 explicit SID allocation failsEnsure that the zebra_srv6_sid_ctx object is properly freed if
zebra_srv6_sid_alloc fails, to prevent memory leaks in the SRv6
explicit SID allocation code path.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
zebra: Clean up possible memory leaks on shutdown of clientWhen cleaninmg up a client and at the same time the decision
was made to shutdown, ensure that streams are not leaked.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Add a specific test to show that nht resolution changesWhen two different clients are both tracking the same nexthop
let's ensure that they can resolve to different nexthops and
at reconverge when the different routes change.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Fix all_protocol_startup for nht changesThe nht output has changed and is being updated to reflect
the reality of how it actually works now.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Change rnh data structure to be per clientCurrently when a client protocol does nexthop tracking
the created rnh is shared for each client that wants
to watch a particular prefix. This had the bad behavior
of causing problems when two clients are trying to track
the same prefix/address but have different flags. The
last watcher will win and change the flags. This
can/will cause upper level protocols to match to the
wrong prefix, thu...
bgpd: Drop unused BGP_NOTIFY_UPDATE_UNREACH_NEXT_HOP notify subcodeFixes: 7db79991a0bd9b77c07f45c6c9eaa83b84552d23 ("bgpd: Don't send notification if IPv6 Link-Local is not assigned on the interface")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
doc: Exclude 240.0.0.0/4 from allow-reserved-rangesIt's already included (whitelisted) by default.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
gdb: Move the bgp macros to their own fileNot everyone wants to load the bgp macros when debugging
a different daemon
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
gdb: Add dump_pim_upstream and dump_jp_agg_list macrosAdd a bit of macro magic to allow the dump of these data
structures from pim.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: add missed show coverage- drill query down into generic vrf state that would exclude zebra specific
state.
Signed-off-by: Christian Hopps <chopps@labn.net>
zebra: Modify the function to obtain GR clientModified zebra_gr_enabled_for_vrf() function to obtain the
GR client instead of obtaining the client info in the caller
function and then passing it to zebra_gr_enabled_for_vrf()
Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
bgpd: skip SYNC flag on bypass paths from zebraWhen an ESI transitions into LACP Bypass state, zebra will notify BGP
about the bypass state before it sends any MACIP DELs, which triggers
bestpath to run before any locally originated paths (from zebra) have
been withdrawn.
Since these MACIPs point to an ESI that is no longer considered to be
local, we need to avoid setting the SYNC flag on them to ensure zebra
installs the entries as remote....