tools: fix checkpatch.pl for 'FOO < BAR && ...'In the check $to gets value from $LvalOrFunc in regular expression that
ends with '\s*', so in case of check for
if (FOO < BAR && somethingelse)
$to equals 'BAR ' and check that on right side there is also a constant
fails.
Simple fix: add '\s*' to re that checks whether $to is constant.
Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>
lib: Medium coverity fix - Dereference null return valueCID 109379: Dereferencing vrf, which is known to be NULL
Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
lib: Medium coverity fix - Dereference null return valueCID 18907: Dereferencing bit, which is known to be NULL
Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
lib: Medium coverity fix - Dereference null return valueCID 73544: Dereferencing vrf, which is known to be NULL
Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
lib: Medium coverity fix - Dereference null return valueCID 20305: dereference: Dereferencing ifp, which is known to be NULL.
Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
lib: Medium coverity fix - Dereference null return valueCID 19206: Dereferencing ifp, which is known to be NULL.
We’re tearing down the tree by repeatedly deleting a node
(if_delete(&ifp) removes it from the RB trees and frees it) until it’s
empty. Adding safe-check to satisfy coverity.
Signed-off-by: Krishnasamy <krishnasamyr@nvidia.com>
pimd: Prevent crash on interface removalPrevent a crash when we remove interfaces from pim configuration
at scale.
Ticket: CM-32197
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: ensure zif mac_list exists before unlinking macEnsure that an ifp's evpn mac_list still exists before trying
to reference it, when unlinking a mac object.
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
ospfd: Reflect forwarding-address-self parameter in `show ip ospf`r1# show ip ospf json
{
...
"forwardingAddressSelf":true,
...
}
or
r1# show ip ospf
OSPF Routing Process, Router ID: 240.0.0.100
...
Forwarding address is set to self for external LSAs <<<<<<
...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
ospfd: Implement `forwarding-address-self` commandThis command will be used to force external LSAs to be generated with the
Forwarding Address to be set to self to allow receiving routers sending the
traffic directly to the ASBR router instead of relying on the FD.
The use case is for ECMP if we receive an external LSA with the identical FD.
So in this case only a single entry will be installed into the RIB.
r3# show ip ospf database externa...
bgpd: be careful parsing incoming label in nlriOnly look at octets we think are valid when parsing a label
stack in an NLRI
Signed-off-by: Mark Stapp <mjs@cisco.com>
bgpd: Fix some CI warnings< WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
< #895: FILE: /tmp/f1-3241746/bgp_aspath.c:895:
< WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
< #898: FILE: /tmp/f1-3241746/bgp_aspath.c:898:
< WARNING: Missing a blank line after declarations
< #927: FILE: /tmp/f1-3241746/bgp_aspath.c:927:
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
tests: Add BGP maximum-prefix session recovery topotestTest BGP session recovery after maximum-prefix overflow when limit
is increased or unset for regular neighbors and peer-groups.
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
ospfd: fix sign comparison warnings in SNMP codeFix compiler warnings about comparing signed and unsigned integers
by casting arithmetic expressions to size_t to match the type of
*length parameter.
Fixed in functions:
- ospfAreaRangeLookup
- ospfHostLookup
- ospfIfLookup
- ospfIfMetricLookup
- ospfVirtIfLookup
- ospfNbrLookup
- ospfExtLsdbLookup
Signed-off-by: jared mauch <jared@puck.nether.net>
bgpd: Fix maximum-prefix session recovery for peers and peer-groupsWhen a BGP session goes down due to maximum-prefix overflow, modifying
the configuration should allow the session to recover. However, the
session remains in Idle state because PEER_STATUS_PREFIX_OVERFLOW is
not cleared.
Fix three scenarios:
1. Increasing maximum-prefix limit on regular neighbor
2. Increasing maximum-prefix limit on peer-group member
3. Unsetting maximum-prefix on peer-group m...
isisd: use IPv6 MTID for SRv6 locator TLVs when IPv6 MT is enabledWhen IS-IS is configured with IPv6 Multi-Topology (topology ipv6-unicast),
SRv6 locator TLVs are still advertised with MTID 0 (ISIS_MT_STANDARD).
This patch makes SRv6 locator TLVs use the IPv6 MTID returned by
isis_area_ipv6_topology(area), so that they are consistent with IPv6
reachability TLVs and interoperable with implementations that expect
locators in the IPv6-unicast MT.
Signed-off-by:...
zebra: Check if the netlink socket is _active_ before doing batch opskernel_terminate() might be called earlier before kernel_update_multi(), where
kernel_terminate() frees netlink socket buffers, closes the socket, etc.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
zebra: Add log during local sticy mac to remote sticky mac changeLet's assume the DUT receives sticky mac of a remote host, but it
already learnt the same mac as local sticky mac. Currently, Zebra
reprograms the local sticky to remote sticky MAC.
When this happens, we don't log any message about the mac movement.
So adding a log.
UT after the fix:
Leaf1 ------- Leaf2(DUT)
To recreate this scenario, we need to configure route-map filter on Leaf1
to deny MACI...