zebra: add CLI 'no' versions for max-bw and othersAdd '[no]' versions for commands:
* max-bw
* max-rsv-bw
* unrsv-bw
Without these frr-reload failed after deletion of link-params with these commands.
For them to work update:
* lib_interface_zebra_link_params_max_bandwidth_destroy
* lib_interface_zebra_link_params_max_reservable_bandwidth_destroy
* lib_interface_zebra_link_params_unreserved_bandwidths_unreserved_bandwidth_destroy
All three...
bgpd: Fix Coverity analysisThis fixes coverity warning: Assigning value "NULL" to "pfx"
here, but that stored value is overwritten before it can be used
Removed unnessary NULL assignement to const struct prefix *pfx
- The line pfx = NULL; assigns NULL to the variable
- Immediately after, the very next statement checks a condition
and overwrites pfx with a different value
- The NULL value is never actually used - ...
tests: Add test cases to verify nexthop resolution for SRv6 uA SIDs- Add a new router, r2, to the topology and connect it to r1.
- On r1, create a uA SID associated with the interface between r1 and
r2. Verify that the nexthop is resolved correctly and the SID is
properly installed in the RIB.
- Bring down the interface between r1 and r2 to simulate a neighbor
down event. Ensure the SID is removed from the RIB since the neighbor
is no longer available....
staticd: Only set flag when the SID is actually sent to zebraIn several places, staticd calls `static_zebra_srv6_sid_install` and
then immediately sets the `STATIC_FLAG_SRV6_SID_SENT_TO_ZEBRA` flag.
However, this is unnecessary because the flag is already set within
`static_zebra_srv6_sid_install` just before the function returns.
Moreover, explicitly setting `STATIC_FLAG_SRV6_SID_SENT_TO_ZEBRA` after
calling `static_zebra_srv6_sid_install` - without ch...
zebra: Remove the nexthop resolution logic from the SRv6 SID ManagerSince nexthop resolution is already performed by staticd, there is no
need to duplicate this logic in the SRv6 SID Manager.
This commit removes the nexthop resolution logic from the SID Manager.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
staticd: Send neighbor discovery messages to verify stale neighborsWhen there is no traffic to a neighbor for some time, the Linux kernel
may mark that neighbor as STALE, indicating the entry is valid but
possibly outdated.
This commit updates staticd to handle this scenario as follows:
- When a neighbor becomes stale, staticd triggers a neighbor discovery
message to check if the neighbor is still reachable. The Linux kernel
sends this message.
- If the ...
staticd: Do not attempt to install SIDs when nexthop is unavailableWhen staticd receives a notification that an interface has come up, it
iterates over all SIDs and attempts to install each one in the RIB by
calling static_zebra_srv6_sid_install.
However, if a SID requires nexthop resolution and the nexthop has not
yet been resolved (because no nexthop is currently available),
attempting installation is unnecessary and will fail.
This commit adds a check to ...
staticd: Cleanup all associated neighbors on interface downWhen staticd receives a notification that an interface has gone down,
it should remove all neighbors associated with that interface.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
staticd: Handle neighbor add and neighbor delete notificationsThis commit introduces the following behavior:
- When staticd receives a notification about a new neighbor, it adds
the neighbor to the neighbor table and checks if any SIDs requiring
nexthop resolution are waiting for this neighbor to become available.
If so, staticd installs all of these SIDs in the RIB.
- When staticd receives a notification that a neighbor has been
deleted, it remo...
staticd: Use resolved nexthop for SIDs that require nexthop resolutionIn staticd, you can create a uA SID using the following CLI:
```
segment-routing
srv6
static-sids
sid fcbb:bbbb:fe10::/48 behavior uA interface eth10 [nexthop 2001::2]
```
The nexthop parameter is optional.
- If a nexthop is provided, staticd stores it in `sid->attributes.nh6`.
- If a nexthop is not provided, staticd resolves the nexthop and stores
it in `sid->attributes.resolved_nh6...
staticd: Register and unregister for neighbor notificationsThis commit implements the following behavior:
- When a user configures a SID that requires nexthop resolution,
staticd registers for neighbor notifications (if not already
registered) and increments the counter of SIDs requiring nexthop
resolution.
- When a user removes a SID that required nexthop resolution, staticd
decrements the counter and unregisters from neighbor notifications i...
staticd: Set a flag to indicate that a SID requires nexthop resolutionIn staticd, you can create a uA SID using the following CLI:
```
segment-routing
srv6
static-sids
sid fcbb:bbbb:fe10::/48 behavior uA interface eth10 [nexthop 2001::2]
```
When a user configures a uA SID without specifying the nexthop, staticd
should set the STATIC_FLAG_SRV6_SID_NEEDS_NH_RESOLUTION flag.
This flag indicates that the SID requires nexthop resolution before it
can be insta...
staticd: Add infrastructure to track neighborsThis commit adds infrastructure to track neighbors of interest and
store their information.
Neighbor information includes:
- The interface to which the neighbor is attached
- IP address
- State (e.g., reachable, stale, etc.)
Future commits will extend staticd to retrieve neighbor information
from zebra and populate the neighbor hash table accordingly.
Signed-off-by: Carmine Scarpitta <cscarp...
lib: Add zclient API to request neighbor informationThis commit introduces a zclient API that enables daemons to request
neighbor information for a specific interface from zebra.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
zebra: Handle ZEBRA_NEIGH_GET message typeWe have a ZAPI message type, ZEBRA_NEIGH_GET, but it is currently not
handled by zebra.
This commit extends zebra to handle ZEBRA_NEIGH_GET, allowing daemons
to request and retrieve information about neighbors on a specific
interface.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
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: Change bgp_peer_reg_with_nht to be connection basedThis function really is connection based, let's convert it over
to connection based.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: bgp_replace_nexthop_by_peer is connection orientedLet's switch this function over to being connection oriented
instead of peer oriented. Since that is what it is doing.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
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,...