bgpd: fix srv6-only command defaulted when 'no segment-routing ipv6'When the 'no segment-routing ipv6' command is applied, the current
srv6-only configuration is still used; this makes think that the
previous command is ineffective. Fix this by defaulting the value to
false.
Fixes: 4c80ab09dfd7 ("bgpd: add srv6-only command per bgp instance")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: fix uninitialized variable in bgp_need_listeningThe listener variable was not initialized to NULL, causing undefined
behavior when the listen_sockets list is empty. This prevented the
listening socket from being created for the default VRF, leading to
poll() errors and crashes in BGP tests.
Root cause: When the list is empty, the loop never executes, leaving
listener uninitialized. The subsequent NULL check then reads an
uninitialized value...
bgpd: fix memory leak in BGP NHC TLV processingFix memory leak that occurs when processing duplicate NHC TLVs in
BGP UPDATE messages. The code was allocating a TLV structure and
value buffer before checking if a TLV with the same code already
existed. If a duplicate was found, the newly allocated TLV was
leaked.
Also fix error path where TLV was not freed before returning on
NNHN TLV validation error.
This leak can occur on long-lived BGP...
bgpd: add evpn prefix in json outputPR 4850 has changed JSON output format where
evpn prefix is dissected to display each
fields. In effort to do so, it removed the
evpn prefix and prefixlen fields which causes
a regression issue in exisitng cli parser.
Adding back evpn prefix and prefixlen.
Ticket: CM-30105
Reviewed By:CCR-10420
Testing Done:
TORS1# show bgp l2vpn evpn route vni 1002 mac
00:02:00:00:00:01 ip fe80::202:ff:fe00:...
lib: ospf_snmp.c is compiling with warningsSince the change to the byte length macros
was switching it from a sizeof(X) to a straight
number, the number is being treated as a integer.
GCC is rightly treating this as mixing integer
sizes and calling out problems. Let's tell
the compiler that these values are actually Unsigned
Longs.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib: Change sizeof(..) to actual byte sizes for addressesCoverity is complaining about mixing sizeof operators with
ptr arithmetic. Let's just convert to the actual byte sizes
instead of doing sizeof().. We already have this in other
places in the code. Should be ok.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Add a test to check if BGP socket is created for a default VRFApplied a black styling also...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Activate listening socket for a default VRF when createdThe intention was to stop/start listening sockets for VRF instances, but not
for a default VRF. This is especially useful for VRF leaking, when non-default
VRFs do not have any peers configured.
Fixes: f8dafef42b694de723df256765df37f8405ef48e ("bgpd: avoid socket activation for VRF instances")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
docker: Move apk dependencies into APKBUILD fileInstall as root, but take them from APKBUILD file to be consistent as others.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
zebra: Check return code of sscanfWe check the return code of sscanf, every where but this
place. Do so.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
nhrpd: Initialize variableCoverity thinks it is possible that FRR has
a code path where the nmba_addr is not initialized
when it is used to set another variable. Let's
make coverity happy.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: check import of non zebra extern_learn neighborsCheck import of non zebra extern_learn neighbors to zebra neighbor
table.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
zebra: moving the macro as per review commentmjstapp does not think this macro belongs to lib/prefix.h
hence moving it to zebra where its currently being used.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
lib,zebra: define GUA ipv6 address lengthGUA IPv6 address max length can be 40 characters,
hence defining new for #define to use where possible
as column width etc.
Signed-off-by: Chirag Shah <chirag@nvidia.com>
bgpd: check vtep not null in show vni routespost v4/v6 vtep change, check for input vtep pointer
validitiy before accessing it.
Signed-off-by: Chirag Shah <chirag@nvidia.com>