bgpd:send EOR during GR only when fib install comeplete for wfi routesCurrently during GR, EOR is sent to neighbor prematurely for wfi enabled
case. below fix has be implemented.
keep a counter to track the routes installed in FIB.Increamnet
counter when bgp send route install to zebra, decreamnet counter when
fib install ack to received from zebra in bgp.when this count reaches
zero and route deferred count is 0 ad gr route syn pending is set, then
do further pr...
bgpd: correction in json output structure for no data caseProblem:
The VTYSH JSON output is not in the proper format when bgp l2vpn-evpn
information is missing or not populated for a given vni-id. This results
in a malformed JSON structure, which causes a parsing error.
Fix:
Corrected the JSON output structure generated during command execution
to properly handle cases where no bgp l2vpn-evpn data is available for a
given vni-id.
Before Fix:
```
{...
bgpd: backpressure - decouple with GRDecoupling GR and backpressure i.e. in case GR is kicked in, the
deferred best path selection will continue its normal flow of BGP
installing/uninstalling routes directly into zebra rather than
applying backpressure logic of processing it later.
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
tests: Add a test for the use-underlays-nexthop-weight commandThis new `featurette` needs a quick test that shows that it is working.
Have a simple diamond topology with ebgp being the underlay with ebgp
also having a overlay route that uses the underlays routes. Then turn
on `use-underlays-nexthop-weight` and make sure that the nexthop weights
are carried through, finally on r4 change the weight and ensure that
r1 gets the new weight.
Signed-off-by: Do...
sharpd: Add 'sharp use-underlays-nexthop-weight`Allow the operator to specify that the sharp installed
route should use the underlying nexthop weight of the
recursively resolved route.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: Add `use-underlays-nexthop-weight` commandAdd a command: `use-underlays-nexthop-weight`
This command is taken at the bgp config_node
level. When it is not configured the
nexthop weights programmed to zebra do
not change.
When it is configured if a route is being
installed has weights, use that and do
not ask zebra to use the underlying nexthop
weights at all, use the ones sent down.
If the route does not have any weights
associated ...
zebra: Allow recursive resolution to use the underlying weightCurrently if you have a situation where a route is installed
and it is resolving recursively, if the underlying nexthop group
that you are resolving against has weights, add some code
that allows the upper level protocol to signal that the
nexthop weights should be used.
Add a flag in lib/zclient.h `ZEBRA_FLAG_USE_RECURSIVE_WEIGHT`
that can be passed from an upper level protocol. If this
is f...
bgpd: add remoteTransposedSid value in json output of vpn pathsThe transposed SID value is not visible from the VPN paths.
> r1# show bgp ipv4 vpn 10.0.0.0/24
> BGP routing table entry for 65001:20:10.0.0.0/24, version 3
> not allocated
> Paths: (1 available, best #1)
> Advertised to peers:
> 2001:db8:12::2
> Local
> 0.0.0.0 from 0.0.0.0 (192.0.2.1) vrf Vrf20(7) announce-nh-self
> Origin incomplete, metric 0, weight 32768, valid, sourced,...
tests: Ensure v6 GUA is present before continuing the testIn the bgp_ipv6_ll_peerings test it is currently adding
the v6 GUA addresses on two different interfaces and
the test is also configuring a bgp neighbor that should
use the GUA address. It is possible on a heavily loaded
system that the v6 GUA has not had time to flow through
the kernel -> zebra -> bgp before bgp establishes it's
peering with the neighbor. Let's ensure that the v6
address is ...
tests: On ospfd restart ensure it is up and runningThe ospfd daemon is restarted and the test was originally just
immediately opening a connection to it via the ospfapiclient.
Let's modify the test to check to see that ospfd is up and at
least connected to zebra before continuing the test.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: A bunch of tests have had debug statements creep inLet's go through and cleanup the tests that have had debug statements
turned on and remove them.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: ra lifetime and interval checkwhen ra lifetime is 0, the interval check of
lessthan lifetime should not be done.
Ticket: #4205240
Testing:
root@r1:mgmt:/var/log/frr# nv set interface swp3 ip neighbor-discovery router-advertisement interval 10000
created [rev_id: 15]
root@r1:mgmt:/var/log/frr# nv set interface swp3 ip neighbor-discovery router-advertisement lifetime 0
root@r1:mgmt:/var/log/frr# nv config apply
applied [rev_...
ripd: Do not send redistributed networks if interface is not enabledThe neighbor command triggers unicast RIP updates even if the underlying
interface is not enabled via the network command, causing routing leakage.
No RIP packets should be sent. The interface is not enabled via network,
so it should remain silent regardless of neighbor configuration.
Cisco, Juniper, Bird, etc. prevents this behavior, let's be consistent with
others too.
Signed-off-by: Donat...
lib: add extern available variadic zlog functionThis is needed to use FRR logging functionality from non-C languages (e.g.,
rust) which cannot use the inline variant, and cannot construct the va_list arg.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: fix for leaf in the root of moduleThis fixes a problem with handling modules which have a leaf nodes at the
root (and so snode->parent == NULL).
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd: fix edit error value to be proper (-) errno.We need to map mgmt_result to `-errno` which we label `error` here. As this is
what is expected to be found in the `mgmt_msg_error->error` field.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: Fix build warning for string literalThis fixes following build error:
lib/csv.c:41:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
ret = vsnprintf(buf, size, fmt, args);
^~~
Signed-off-by: Soumya Roy <souroy@nvidia.com>
tests: cleanup identifier names in fe_client.pyalso remove unneeded __init__.py file it messes up pylint when importing
from the same directory in a script file.
Signed-off-by: Christian Hopps <chopps@labn.net>
bgpd: Add more connection direction debuggingWhen debugging issues having a bit more data about the connection
direction in some situations would be useful.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: crash while accessing subgrp in pafwhen the bgp warmboot is trigerred, all the subgroups from the peer
paf are deleted. but the corresponding router annouce timer are not stopped.
If this timer get scheduled in mean time, we see the crash.
Fix: stop timer before clearing the subgoup from paf.
Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>
*: only include frr json.h where neededRemove our json.h header from some high-use lib headers, and
include it where it's needed. Also avoid the libjson-c
typedefs in some of our apis.
Signed-off-by: Mark Stapp <mjs@cisco.com>
bgpd: Support sending multiple labels in BGP-LUAdd multiple label support in bgp_attr_stream_put_labeled_prefix
Signed-off-by: Kyrylo Yatsenko <hedrok@gmail.com>