Commit Graph

38290 Commits

Author SHA1 Message Date
Donatas Abraitis
cadfc56c89
Merge pull request #18121 from louis-6wind/fix-lable-release
bgpd: release manual vpn label on instance deletion
2025-02-13 21:08:23 +02:00
Donald Sharp
b9ac2c7b2f
Merge pull request #18080 from opensourcerouting/fix/enable_ll_capability_if_using_unnumerred
bgpd: Some fixes/improvements for Link-Local Next Hop capability
2025-02-13 14:06:24 -05:00
Donatas Abraitis
5d8bef6442
Merge pull request #18142 from donaldsharp/vrf_tableid_debugs
Vrf tableid debugs
2025-02-13 20:52:16 +02:00
Donald Sharp
8a661e5152
Merge pull request #18064 from cscarpitta/fix/fix_srv6_sid_parameters
staticd: Fix SRv6 SID installation and deletion
2025-02-13 13:37:22 -05:00
Carmine Scarpitta
caeef98e73
Merge pull request #18023 from pguibert6WIND/srv6_route_dump
lib: fix false context information for SRv6 route
2025-02-13 18:57:44 +01:00
Philippe Guibert
52a3239b26
Merge pull request #18079 from donaldsharp/labelpool_crash
bgpd: Fix crash in bgp_labelpool
2025-02-13 18:44:19 +01:00
Donald Sharp
9101bff6d2 tools: watchfrr should ignore frr_global_options
watchfrr is currently being started with $frr_global_options
This is problematic as that it has a entirely different cli
than the rest of the daemons and we have no plans to make
this equivalent.

Fixes: #18107

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-13 11:41:27 -05:00
Russ White
fbff0436d3
Merge pull request #18046 from LabNConsulting/aceelindem/ospf-lsa-add-delete-hook
ospfd: Replace LSDB callbacks with LSA Update/Delete hooks.
2025-02-13 11:16:42 -05:00
Rafael Zalamena
80a12477e0 pimd,topotests: frrbot styling suggestions
Incorporate frrbot suggestion to avoid the CI warning.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 13:07:34 -03:00
Rafael Zalamena
ee6c4fb7a9 topotests: test IGMPv2/MLDv1 immediate leave
Add new topology for testing IGMPv2/MLDv1 immediate leave and more features
in the future.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 13:05:19 -03:00
Rafael Zalamena
16511bf3b0 doc: document new immediate-leave commands
Let user know about this new multicast knob.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 12:45:48 -03:00
David Lamparter
df9517c95a pimd: add IGMPv2/MLDv1 immediate-leave
(Somewhat) useful when dealing with an interface that has only one host
attached.  Only works for IGMPv2 and MLDv1, other protocol versions have
no leave message.

Co-authored-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2025-02-13 12:45:47 -03:00
Donald Sharp
40744f4f3d zebra: Use tableid when displaying prefix
Found some more instances of tableid not being
displayed when trying to debug something.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-13 10:40:52 -05:00
Donald Sharp
b4786a61e2 pbr: Add tableid to some debugs
Add prefix and tableid to one debug instead of several.
Consolidate a bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-13 10:40:17 -05:00
Jafar Al-Gharaibeh
f70530c8e8
Merge pull request #18032 from opensourcerouting/gmp-limit
pimd,pim6d: implement GMP group / source limits
2025-02-13 09:32:07 -06:00
Louis Scalbert
85784be2ec bgpd: remove unused afi arg from bgp_cleanup_table
Remove unused AFI argument from bgp_cleanup_table()

Fixes: ec6e09c271 ("bgpd: fix flushing ipv6 flowspec entries when peering stops")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-13 16:04:33 +01:00
Louis Scalbert
b5014d371c bgpd: factorize bgp_table_cleanup()
Factorize bgp_table_cleanup(). Cosmetic change. It will help adding
AFI / SAFI in the future.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-13 15:59:06 +01:00
Y Bharath
4f7b45f28b yang: Default value for a key leaf to be ignored
In YANG, key leaves are used to uniquely identify list entries, and they
cannot have default values

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-02-13 17:10:46 +05:30
Donatas Abraitis
44fe3981ee zebra: Do not flush an existing vni configuration trying to remove wrong vni
Before:

```
pc.donatas.net(config)# do sh run | include vni
vni 1
pc.donatas.net(config)# no vni 2
pc.donatas.net(config)# do sh run | include vni
pc.donatas.net(config)#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-02-12 23:37:20 +02:00
Donatas Abraitis
007243d94d
Merge pull request #18120 from louis-6wind/fix-bgp-rd-json-show
bgpd: fix incorrect JSON in bgp_show_table_rd
2025-02-12 22:09:39 +02:00
Christian Hopps
4d4e85a541
Merge pull request #18118 from y-bharath14/srib-yang-v1
yang: Reorder the revision statements
2025-02-12 14:46:59 -05:00
Mark Stapp
6d14b169e6
Merge pull request #18125 from donaldsharp/bfd_fd_zero
bfdd: 0 is a valid fd.
2025-02-12 14:21:42 -05:00
Donald Sharp
9219fa39f2
Merge pull request #17649 from ariel-anieli/calloc-warns
tests: clear `-Wcalloc-transposed-args` warnings
2025-02-12 13:00:36 -05:00
Jafar Al-Gharaibeh
acd10af3fb
Merge pull request #18026 from donaldsharp/bfd_fixups
Bfd fixups
2025-02-12 12:00:23 -06:00
Donald Sharp
7535465284 bfdd: 0 is a valid fd.
It's unlikely that this would ever get a 0 fd to use
but let's just let the code assume it is ok.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-12 10:33:22 -05:00
Donald Sharp
cea55c9223
Merge pull request #18062 from pguibert6WIND/cid_1636504
Cid 1636504
2025-02-12 09:36:21 -05:00
Donald Sharp
418d0064bc
Merge pull request #18068 from opensourcerouting/fix/coverity_link_local_capability
bgpd: Do not check for capability length for Link-Local Next Hop capability
2025-02-12 09:35:16 -05:00
Donald Sharp
9623612fc0
Merge pull request #18094 from opensourcerouting/event-tardy-bfd
lib (+bfd): improve late timer warnings
2025-02-12 09:29:54 -05:00
Mark Stapp
75bc4a47b7
Merge pull request #18049 from donaldsharp/fpm_keep_on_trying
zebra: Allow fpm_listener to continue to try to read
2025-02-12 08:47:02 -05:00
Acee Lindem
b44258413f ospfd: Replace LSDB callbacks with LSA Update/Delete hooks.
Replace the LSDB callbacks with LSA update and delete hooks using the
the FRR hook mechanism. Remove redundant callbacks by placing the LSA
update and delete hooks in a single place so that deletes don't need
to be handled by the update hook. Simplify existing OSPF TE and OSPF
API Server callbacks now that there is no ambiguity or redundancy.
Also cleanup the debugging by separating out opaque-lsa debugging
from the overloaded event debugging.

Signed-off-by: Acee Lindem <acee@lindem.com>
2025-02-12 08:21:34 -05:00
Louis Scalbert
d6363625c3 bgpd: release manual vpn label on instance deletion
When a BGP instance with a manually assigned VPN label is deleted, the
label is not released from the Zebra label registry. As a result,
reapplying a configuration with the same manual label leads to VPN
prefix export failures.

For example, with the following configuration:

> router bgp 65000 vrf BLUE
>  address-family ipv4 unicast
>   label vpn export <int>

Release zebra label registry on unconfiguration.

Fixes: d162d5f6f5 ("bgpd: fix hardset l3vpn label available in mpls pool")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-12 14:03:02 +01:00
Louis Scalbert
cf0269649c bgpd: fix incorrect json in bgp_show_table_rd
In bgp_show_table_rd(), the is_last argument is determined using the
expression "next == NULL" to check if the RD table is the last one. This
helps ensure proper JSON formatting.

However, if next is not NULL but is no longer associated with a BGP
table, the JSON output becomes malformed.

Updates the condition to also verify the existence of the next bgp_dest
table.

Fixes: 1ae44dfcba ("bgpd: unify 'show bgp' with RD with normal unicast bgp show")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-12 13:34:21 +01:00
Y Bharath
3b9191fcc9 yang: Reorder the revision statements
According to the YANG specification, the revision statements should be
ordered with the most recent revision first

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
2025-02-12 12:13:06 +05:30
Jafar Al-Gharaibeh
d275f551c3
Merge pull request #18069 from cscarpitta/fix/bgp_request_srv6_locator
bgpd: Request SRv6 locator after zebra connection
2025-02-11 20:59:22 -06:00
Jafar Al-Gharaibeh
c821a7a207
Merge pull request #18078 from pguibert6WIND/nhrp_incomplete_msg
nhrpd: fix dont consider incomplete L2 entry
2025-02-11 20:57:09 -06:00
Mark Stapp
9943a08720 bgpd: fix vty output of evpn route-target AS4
evpn route-targets are decoded in  ... multiple places; at least
two have a bug where the AS4 form doesn't have its AS decoded.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-02-11 14:35:28 -05:00
Russ White
9af82a24ce
Merge pull request #18037 from pguibert6WIND/bmp_bgp_open_router_id_and_as_val
Bmp bgp open router id and as val
2025-02-11 13:43:09 -05:00
Donatas Abraitis
3d15f24a79 tests: Set scope to be link-local and not global for NH
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-02-11 20:41:14 +02:00
Rajesh Varatharaj
8280257cc9 pimd: Fix for data packet loss when FHR is LHR and RP
Topology:
A single router is acting as the First Hop Router (FHR), Last Hop Router (LHR), and RP.

RC and Issue:
When an upstream S,G is in join state, it sends a register message to the RP.
If the RP has the receiver, it sends a register stop message and switches to the shortest path.
When the register stop message is processed, it removes pimreg, moves to prune,
and starts the reg stop timer.

When the reg stop timer expires, PIM changes S,G state to Join Pending and sends out a NULL
register message to RP. RP receives it and fails to send Reg stop because SPT is not set at that point.

The problem is when the register stop timer pops and state is in Join Pending.
According to https://www.rfc-editor.org/rfc/rfc4601#section-4.4.1,
we need to put back the pimreg reg tunnel into the S,G mroute.
This causes data to be sent to the control plane and subsequently interrupts the line rate.

Fix:
If the router is FHR and RP to the group,
ignore SPT status and send out a register stop message back to the DR (in this context, the same router).

Ticket: #3506780

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
2025-02-11 09:52:15 -08:00
Donald Sharp
54dc8382eb zebra: Allow fpm_listener to continue to try to read
Currently when the fpm_listener attempts to read say X
bytes it may only get Y( which is less than X ).  In this
case we should assume that the dplane_fpm_nl code is just
being slow, as that we know it is possible for it to send
a partial fpm message.  Let's just loosen the constraints
a bit and allow data to flow.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2025-02-11 12:42:02 -05:00
Donald Sharp
f64104bd97
Merge pull request #18060 from opensourcerouting/lib-crashlog-signals
lib: crash handlers must be allowed on threads
2025-02-11 12:25:28 -05:00
Russ White
c2159b7f53
Merge pull request #18081 from chiragshah6/bgp_dev6
bgpd: fix bgp vrf instance creation from implicit
2025-02-11 12:19:45 -05:00
Donatas Abraitis
6f42b09757 tests: Disable link-local capability to check if we can use GUA NHs
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-02-11 17:01:56 +02:00
Donatas Abraitis
ca24f56a5c bgpd: Add an ability to disable link-local capability per peer
Even if we have unnumbered peering, let's respect `no neighbor X capability link-local`
and disable it per-neighbor on demand.

Fixes: db853cc97e ("bgpd: Implement Link-Local Next Hop capability")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2025-02-11 17:01:56 +02:00
Russ White
b814cc5706
Merge pull request #18034 from donaldsharp/unneeded_isisd
isisd: Remove unneeded modify functions
2025-02-11 08:50:09 -05:00
Russ White
b040b83c35
Merge pull request #17870 from opensourcerouting/fix/bgp_show_ip_bgp_cmd_internal
bgpd: Show internal data for BGP routes
2025-02-11 08:44:43 -05:00
Russ White
5518a8c916
Merge pull request #17370 from louis-6wind/fix-vpn-leaking
bgpd: fix for the validity and the presence of prefixes in the BGP VPN table.
2025-02-11 08:41:03 -05:00
David Lamparter
236a5c8ddb lib: thread -> event in formatting
Make it consistent and call it `event` when formatting something to
display.  Much less confusing for some user seeing it too, since threads
aren't involved.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-11 12:16:17 +01:00
David Lamparter
5bc4309b61 bfdd: use lower lateness warning for TX timers
FRR's event loop prints a warning if a timer is executed more than some
given threshold late, default being 4s.  Set a more appropriate
threshold for BFD TX timers (half TX interval).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-11 12:16:11 +01:00
David Lamparter
ff76fb21d7 lib: improve late timer warnings
Refactor the "timer getting executed too late" warning:

- warning threshold is now adjustable
- check is performed when event actually executes, rather than when it's
  thrown on ready list
- ignore_late_timer replaced with threshold = 0
- system load averages printed in log message
- warning ratelimited to once per 10s rather than once per poll()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2025-02-11 12:16:08 +01:00