tests: Add topotests for SRv6 locator "no prefix" commandAdd two new test cases to tests/topotests/srv6_locator/:
test_srv6_no_prefix()
- Configures locator loc1 with a prefix and verifies it is UP.
- Issues `no prefix` (bare form) and verifies the locator is marked
DOWN with the prefix cleared.
- Re-adds the prefix and verifies the locator returns to UP.
test_srv6_no_prefix_explicit()
- Issues `no prefix 2001:db8:1:1::/64...
tests: Promote `check_srv6_locator` helpers to module level`_check_srv6_locator()` and `check_srv6_locator()` were inner functions
of `test_srv6()`. Move them to module level so they can be shared with
the upcoming `test_srv6_no_prefix` and `test_srv6_no_prefix_explicit`
tests.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
zebra: Restore locator status_up when re-adding a prefixThe `no prefix` command marks the locator DOWN (`status_up = false`)
and clears the prefix, correctly reflecting that the locator is no longer
usable. However, when the operator subsequently issues `prefix X:X::X:X/M`
to re-add a prefix in the same locator node context, `status_up` is never
reset to true, leaving the locator permanently DOWN even though it now
has a valid prefix and is usable ...
bgpd: Fix SRv6 SID/locator memory leak in SID notify handlerIn `bgp_zebra_srv6_sid_notify()`, `tovpn_sid` and `locator` were
unconditionally allocated before the behavior dispatch, but only
consumed in some branches. Branches that did not consume them
leaked both allocations.
Fix by removing the upfront allocations and allocating directly inside
each branch where the memory is actually needed. Drop the now-unused
local variables tovpn_sid and locator....
zebra: Add "no prefix" CLI command for SRv6 locatorsAdd a new `no prefix` command under the `locator` configuration node,
complementing the existing `prefix` command.
When issued, the command:
- marks the locator as DOWN (status_up = false)
- notifies zclients via ZEBRA_SRV6_LOCATOR_DELETE
- releases all SID entries bound to the locator
- releases the parent SID block
- clears the prefix and bit-length fields
Signed-off-by: Carmine S...
tests: Fix wrong filename and description in test_srv6_locator.pyThe file header comment and module docstring carry a wrong filename
and description. Update both to match the actual filename and describe
what the test does.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
tools: Use numeric only version for pkgconfigVersion: @PACKAGE_VERSION@ in frr.pc.in expands to something like 10.6-dev_git
when built with --with-pkg-git-version, and pkgconf on Alpine strictly
validates version.
Fixes: bc8f749c6e3502c93d65689eede2611b4dbbe2f5 ("build: add pkg-config file")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
zebra: Initialize nl_errno68.72 zebra/zebra_netns_id.c: In function 'zebra_ns_id_get':
68.72 zebra/zebra_netns_id.c:267:34: warning: 'nl_errno' may be used uninitialized [-Wmaybe-uninitialized]
68.72 267 | if (ret != 0 && nl_errno != EEXIST) {
68.72 | ^
68.72 zebra/zebra_netns_id.c:163:13: note: 'nl_errno' was declared here
68.72 163 | int nl_errno;
68.72 ...
tests: Fix vtysh_cmd with configuration in test_zebra_rib.pyThe usage of vtysh_cmd had a code review comment that
the usage for command configuration should be a bit
different. Since I was only following the style
in the script I figured it was better to change the
whole script in mass.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Show that `allow-external-route-update` is working properlyThere were no tests that show that this command even works. Add
a little something-something to make sure things are working
as expected.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Yangify `allow-external-route-update`This command was not enabled to work with yang. Make it so.
Note -> Zebra is not currently setup to use .cli_show. I added
this functionality but am not using it at the moment because
that would require a different set of work. Once that work
becomes available it will `just` work.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd: Convert yang functions to use DEFPY_YANGThere are spots where DEFPY_YANG is not being used.
Let's use it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: EVPN fix stale remote vtep entriesThe EVPN route delete paths in process_subq_early_route_add
(route replace) and process_subq_early_route_delete used
ere->afi (route address family) to determine the VTEP IP type.
For IPv4 routes with IPv6 VTEP endpoints, this incorrectly
created an IPv4 vtep_ip when the nexthop is actually IPv6.
The add path already correctly uses tmp_nh->type (nexthop type).
The mismatch meant delete never m...
lib: add rbtree pop_final apiAdd a simple-minded cleanup api that lets a caller pop
items from an rbtree without undergoing rebalancing.
Signed-off-by: Mark Stapp <mjs@cisco.com>
ospf6d: clear local ifp per ECMP path rebuildDuring intra-prefix ECMP recomputation, ifp was reused across\nold_route->paths iterations. That can carry a previously matched\ndirect-connected interface into an unrelated path and install an\non-link nexthop incorrectly.\n\nReset ifp at each path iteration before evaluating the current\norigin/path context.
Signed-off-by: Andreas Florath <Andreas.Florath@telekom.de>
bfdd: Allow for command completions to work with peersAdd the ability for bfdd to tell you more about the bfd peers
when you ask for command completion help:
eva# show bfd peer
1::2 2603:6080:602:509e:f6d2:e774:dfce:4b99
eva# show bfd peer 2603:6080:602:509e:f6d2:e774:dfce:4b99
BFD Peer:
peer 2603:6080:602:509e:f6d2:e774:dfce:4b99 local-address 2603:6080:602:509e:f6d2:e774:dfce:4b08 vrf default interface enp13s...
bfdd: Fix `show bfd peers brief` to display local address in some casesWhen the bfdd peering has not been established if you have a local peer
when you do a `show bfd peers brief` the local address is listed as unknown.
Which is poppycock:
bfd
peer 2603:6080:602:509e:f6d2:e774:dfce:4b99 local-address 2603:6080:602:509e:f6d2:e774:dfce:4b08 interface enp13s0
exit
!
exit
!
end
eva# show bfd peers brief
Session count: 1
SessionId LocalAddress ...
bfdd: Look up the bfdd peer a bit earlier on packet receptionThe bfdd code looks up the bfdd peer very late in the packet reception
path. Move the peer lookup to much earlier, mainly so that the bad packets
received can be associated with the correct peer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd: Remove unnecessary NULL checkbfdd is finding the bfd session and if we do not find one,
the function returns. The very next if statement is checking to see
if the bfd pointer is NULL. We know it is not NULL there.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd, yang: Add a bad packet counter for bfd peersCurrently bfdd completely ignores bad packets received and
there is no way to know that a bad packet has been coming
in unless you infer it through other means. This is not
easy for a operator to do.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
doc: bgp: add entry for `neighbor PEER soft-reconfiguration inbound`Add short entry explaining the `soft-reconfiguration inbound` command.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
ci: harden MIB downloads and add shared workflow cacheAdd a dedicated CI cache preparation flow for MIB files and restore
that cache in build jobs so Docker builds reuse cached MIB assets
instead of repeatedly downloading from external links.
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
ci: set artifact retention and upload strictnessSet explicit retention periods for build and test artifacts
and define if-no-files-found behavior to improve CI storage
hygiene and upload diagnostics.
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
bgpd: change L2 attr displayL2attr display is too long:
> L2: P flag:Y, B Flag Y, C word Y, MTU 1500
change to
> L2: Cflags CPB, MTU 1500
Signed-off-by: Loïc Sang <loic.sang@6wind.com>