Commit graph

37295 commits

Author SHA1 Message Date
Chirag Shah 814a89f6e5 tools: fix style check babletrace file
python3 -m black tools/frr_babeltrace.py

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-11-25 09:00:03 -08:00
Chirag Shah 91119dab9b tools: add helper function to print family
Ticket: #4127810
Testing:
2024-11-20T01:52:10.073 frr_zebra:netlink_neigh_update_msg_encode
{'mac': '00:00:00:00:00:00', 'ip': '27.0.0.4', 'nhg': 0, 'flags': 2,
'state': 192, 'family': 'bridge', 'type': 0, 'op': 23}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-11-25 09:00:03 -08:00
Chirag Shah 866148ef1b zebra: add debug in remote vtep install ifp not up
Ticket: #4139506

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-11-25 09:00:03 -08:00
Chirag Shah 97538158ba zebra: EVPN add debug trace for HREP entry
Ticket: #4139506

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-11-25 09:00:03 -08:00
Chirag Shah adae8192d1 zebra: EVPN check vxlan oper up in vlan mapping
When VLAN-VNI mapping is updated, do not set the L2VNI up event
if the associated VXLAN device is not up.
This may result in bgp synced remote routes to skip installing
in Zebra and onwards (Kernel).

Ticket: #4139506

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2024-11-25 09:00:03 -08:00
Donatas Abraitis 0bacbc6493
Merge pull request #17369 from louis-6wind/bgp_vpnv4_route_leak_basic
tests: add bgp_vpnv4_route_leak_basic
2024-11-25 15:25:14 +02:00
Donald Sharp 28b45fd553
Merge pull request #17498 from cscarpitta/fix/fix-frr-reload-2
tools: Add missing keyword `encapsulation` in frr-reload
2024-11-24 08:49:20 -05:00
Donald Sharp a7b25c47bd
Merge pull request #17495 from Orange-OpenSource/ospf-sr
ospfd: Correct invalid SR-MPLS output label
2024-11-24 08:48:36 -05:00
Carmine Scarpitta c8e83c3bfd tools: Add missing keyword encapsulation in frr-reload
Consider the following scenario.

You start from the configuration below:

```
!
segment-routing
 srv6
  encapsulation
   source-address fc00:0:1::1
  !
 !
!
```

Then you change the source address:

```
r1# configure
r1(config)# segment-routing
r1(config-sr)# srv6
r1(config-srv6)# encapsulation
r1(config-srv6-encap) source-address 1::1
```

And finally, reload the configuration
`python3 frr-reload.py --reload /etc/frr/frr.conf`

frr-reload returns the error below:

```
Failed to execute segment-routing  srv6   no source-address 1::1  exit exit
"segment-routing --  srv6 --   no source-address 1::1 --  exit -- exit" we failed to remove this command
% Unknown command:   no source-address 1::1

[79975|mgmtd] sending configuration
line 3: % Unknown command[76]:   source-address fc00:0:1::1
[79975|mgmtd] Configuration file[/etc/frr/frr.conf] processing failure: 2
```

The reason is that the keyword `encapsulation` is missing in frr-reload.

This patch adds the missing keyword `encapsulation`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-24 10:08:47 +01:00
Olivier Dugeon 1bcccb87cd ospfd: Correct invalid SR-MPLS output label
When OSPFd starts, there is 2 possible scenarios for Segment Routing:
1/ Routes associated to Prefixes are not yet available i.e. Segment Routing LSA
are received before LSA Type 1. In this case, the function
ospf_sr_nhlfe_update() is triggered when a new SPF is launch. Thus, neighbors
and output label are always synchronise with the routing table.
2/ Routes are already available i.e. LSA Type 1 are received before Segment
Routing LSA, in particular the Router Information which contains the SRGB.
During nhlfe computation, perfixes are leave with incomplete configuration, in
particular, the SR nexthop is set to NULL. If this scenario is handle through
the function update_out_nhlfe (triggered when SRGB is received or modified from
a neighbor node), the output label is not correctly configured as the nexthop
SR node associated to the prefix has been leave to NULL.

This patch correct this problem by calling the function compute_nhlfe() when
the nexthop SR Node associated to the prefix is NULL within the
update_out_nhlfe() function. Thus, we guarantee that the SR prefix is always
correctly configuration indpedently of the scenario i.e. arrival of the
different LSA.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2024-11-23 19:05:25 +01:00
Donald Sharp d745f4eae5
Merge pull request #17459 from opensourcerouting/fix/disable_rpki_community_by_default
bgpd: Disable sending ROV extended community by default
2024-11-23 09:13:06 -05:00
Donald Sharp 48306bae2c
Merge pull request #17493 from cscarpitta/fix/fix-frr-reload
tools: Add missing keywords in frr-reload
2024-11-23 09:11:45 -05:00
Carmine Scarpitta 458e8a8516 tools: Add missing keyword node-msd in frr-reload
Fix the error below:

```
[58564|mgmtd] sending configuration
[58565|zebra] sending configuration,
line 14: % Unknown command[52]:  max-segs-left 3
line 18: % Unknown command[52]:  max-end-pop 3
line 22: % Unknown command[52]:  max-h-encaps 2
line 26: % Unknown command[52]:  max-end-d 5
[58573|isisd] sending configuration
[58565|zebra] Configuration file[/etc/frr/frr.conf] processing failure: 2
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-23 08:56:05 +01:00
Carmine Scarpitta b4babae93b tools: Add missing keyword segment-routing srv6 in frr-reload
Fix the error below:

```
[58564|mgmtd] sending configuration
[58565|zebra] sending configuration,
line 10: % Unknown command[52]:  node-msd
[58573|isisd] sending configuration
[58565|zebra] Configuration file[/etc/frr/frr.conf] processing failure: 2
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-11-23 08:55:55 +01:00
Mark Stapp c84fd512ca
Merge pull request #17492 from donaldsharp/zebra_nh_label_crash
lib, zebra: Do not have duplicate memory type problems
2024-11-22 15:41:32 -05:00
Donald Sharp cb6f7b153e lib, zebra: Do not have duplicate memory type problems
In zebra_mpls.c it has a usage of MTYPE_NH_LABEL which is
defined in both lib/nexthop.c and zebra/zebra_mpls.c.  The
usage in zebra_mpls.c is a realloc.  This leads to a crash:

(gdb) bt
0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:44
1  __pthread_kill_internal (signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:78
2  __GI___pthread_kill (threadid=126487246404032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
3  0x0000730a1b442476 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
4  0x0000730a1b94fb18 in core_handler (signo=6, siginfo=0x7ffeed1e07b0, context=0x7ffeed1e0680) at lib/sigevent.c:268
5  <signal handler called>
6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:44
7  __pthread_kill_internal (signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:78
8  __GI___pthread_kill (threadid=126487246404032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
9  0x0000730a1b442476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
10 0x0000730a1b4287f3 in __GI_abort () at ./stdlib/abort.c:79
11 0x0000730a1b9984f5 in _zlog_assert_failed (xref=0x730a1ba59480 <_xref.16>, extra=0x0) at lib/zlog.c:789
12 0x0000730a1b8f8908 in mt_count_free (mt=0x576e0edda520 <MTYPE_NH_LABEL>, ptr=0x576e36617b80) at lib/memory.c:74
13 0x0000730a1b8f8a59 in qrealloc (mt=0x576e0edda520 <MTYPE_NH_LABEL>, ptr=0x576e36617b80, size=16) at lib/memory.c:112
14 0x0000576e0ec85e2e in nhlfe_out_label_update (nhlfe=0x576e368895f0, nh_label=0x576e3660e9b0) at zebra/zebra_mpls.c:1462
15 0x0000576e0ec833ff in lsp_install (zvrf=0x576e3655fb50, label=17, rn=0x576e366197c0, re=0x576e3660a590) at zebra/zebra_mpls.c:224
16 0x0000576e0ec87c34 in zebra_mpls_lsp_install (zvrf=0x576e3655fb50, rn=0x576e366197c0, re=0x576e3660a590) at zebra/zebra_mpls.c:2215
17 0x0000576e0ecbb427 in rib_process_update_fib (zvrf=0x576e3655fb50, rn=0x576e366197c0, old=0x576e36619660, new=0x576e3660a590) at zebra/zebra_rib.c:1084
18 0x0000576e0ecbc230 in rib_process (rn=0x576e366197c0) at zebra/zebra_rib.c:1480
19 0x0000576e0ecbee04 in process_subq_route (lnode=0x576e368e0270, qindex=8 '\b') at zebra/zebra_rib.c:2661
20 0x0000576e0ecc0711 in process_subq (subq=0x576e3653fc80, qindex=META_QUEUE_BGP) at zebra/zebra_rib.c:3226
21 0x0000576e0ecc07f9 in meta_queue_process (dummy=0x576e3653fae0, data=0x576e3653fb80) at zebra/zebra_rib.c:3265
22 0x0000730a1b97d2a9 in work_queue_run (thread=0x7ffeed1e3f30) at lib/workqueue.c:282
23 0x0000730a1b96b039 in event_call (thread=0x7ffeed1e3f30) at lib/event.c:1996
24 0x0000730a1b8e4d2d in frr_run (master=0x576e36277e10) at lib/libfrr.c:1232
25 0x0000576e0ec35ca9 in main (argc=7, argv=0x7ffeed1e4208) at zebra/main.c:536

Clearly replacing a label stack is an operation that should be owned by
lib/nexthop.c.  So lets move this function into there and have
zebra_mpls.c just call the function to replace the label stack.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-22 11:02:15 -05:00
Donald Sharp 909d8546e1
Merge pull request #17487 from opensourcerouting/fix/do_reset_peers
bgpd: Do not reset peers on suppress-fib toggling
2024-11-22 10:15:46 -05:00
Donald Sharp 6e7ab7dddb
Merge pull request #17484 from csiltala/pim-support-bundle
tools: Add pim show commands to support bundle
2024-11-22 09:46:08 -05:00
Donatas Abraitis 7fb4c03f5b bgpd: Do not reset peers on suppress-fib toggling
If the desired state is the same - do nothing instead of resetting once again.

Fixes: bdb5ae8bce ("bgpd: Make suppress-fib-pending clear peering")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-11-22 10:30:37 +02:00
Corey Siltala ef650aca27 tools: Add pim show commands to support bundle
Add more data gathering for pim and pim6 support bundles

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
2024-11-21 17:37:39 -06:00
Jafar Al-Gharaibeh 440a0d3f76
Merge pull request #17477 from donaldsharp/topo_connected_installed
tests: Ensure connected routes are installed before continuing
2024-11-21 14:28:23 -06:00
Jafar Al-Gharaibeh 58abc856b5
Merge pull request #17473 from donaldsharp/bgp_bmp_and_its_ilk
Bgp bfd and its ilk
2024-11-21 14:17:48 -06:00
Rafael Zalamena a3e04a86d2
Merge pull request #17340 from nabahr/mapping-agent
PIMD: Implement AutoRP mapping-agent
2024-11-21 16:10:42 -03:00
Donald Sharp 0af5c2a6eb
Merge pull request #17469 from opensourcerouting/msdp-logs
pimd: MSDP logging improvements
2024-11-21 13:45:58 -05:00
Mark Stapp 9af78e2986
Merge pull request #17476 from donaldsharp/support_bundle_isis
Support bundle isis
2024-11-21 13:15:51 -05:00
Russ White 7724d697da
Merge pull request #17436 from LabNConsulting/aceelindem/ospf-multi-instance-default
ospfd: OSPF multi-instance default origination fixes
2024-11-21 09:20:26 -08:00
Donald Sharp 058faf605d tests: Ensure connected routes are installed before continuing
Upon high load the ospf_instance_redistribute test can attempt
to install routes with sharpd before the connected routes have
fully baked themselves into zebra.  Since sharpd intentionally
has no retry mechanism we need to ensure that the test is waiting
a small bit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:26:52 -05:00
Donald Sharp dca9915059 tools: Add pim msdp show commands to support bundle
The support bundle was not gathering any msdp data
for pim at all.  Let's add a bit to allow us to
have more data here when a suppport bundle is generated

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:16:14 -05:00
Donald Sharp 274156f4d3 tools: Add zebra label show commands to support bundle
There were no zebra show commands related to mpls labels
being generated for support bundles.  Let's rectify that
situation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:15:22 -05:00
Donald Sharp 910b384094 tools: Add isis command generation to support bundle
When a support bundle is created no isis commands were
issued to attempt to gather data about what is going
on in isis.  Let's rectify that

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:14:19 -05:00
Donald Sharp b1fbcb6d13 tools: Add bmp command to support bundle generation
Add a bit of bmp data gathering for bgp support bundle generation

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-21 09:13:24 -05:00
Rafael Zalamena 0b0648f15c topotests: test new log toggle
Test MSDP new log toggle: the MSDP peer connection state and SA events
should be logged.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-21 10:26:16 -03:00
Rafael Zalamena fc39bfaa0a pimd,yang: log MSDP SA events
Add new command to log all SA events.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-21 10:26:16 -03:00
Rafael Zalamena 21d1e85db5 pimd,yang: log MSDP neighbor events
Move MSDP neighbor events global debug to per PIM instance.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-21 10:26:16 -03:00
Louis Scalbert 82a540dcd4 tests: add bgp_vpnv4_route_leak_basic
bgp_vrf_route_leak_basic uses "import/export vrf" commands to perform
route leaks between VRF on the r1 router. The same result can be
achieved by using the "route-target import / export" commands.

Copy bgp_vrf_route_leak_basic to bgp_vpnv4_route_leak_basic. Change
BGP configuration to handle the route leaks with "route-target import /
export". Change to retry timers.  No other changes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-11-21 11:22:22 +01:00
Jafar Al-Gharaibeh 8884f429ab
Merge pull request #17468 from opensourcerouting/msdp-tweaks
pimd: two small improvements
2024-11-20 21:56:14 -06:00
Donald Sharp c1c6298dd3 bgpd: Allow bfd to work if peer known but interface address not yet
If bgp is coming up and bgp has not received the interface address yet
but bgp has knowledge about a bfd peering, allow it to set the peering
data appropriately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-20 16:13:42 -05:00
Donald Sharp 6a945b4104 tests: zebra_fec_nexthop_resolution improve
a) timers are really large preventing convergence in 30 seconds
b) The same configuration does not need to be initiated 60 times
when things are not working properly.  Once is enough.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-20 16:11:22 -05:00
Donald Sharp 2a94de8af2 bgpd: bgp_connect should return an enum connect_result
This function when it is run by bgp_start is expected
to return a `enum connect_result`.  But instead
the function returns a variety of values that are
not really being checked for.  Consolidate to a correct
choice.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-11-20 16:11:22 -05:00
Rafael Zalamena bca99119d9
Merge pull request #17464 from mjstapp/fix_bfdd_dplane_client_conn
bfdd: retain remote dplane client socket
2024-11-20 12:35:13 -03:00
Rafael Zalamena 1e0629fd04 pimd: constify peer lookup function
Make parameter `const` to document that the variable will not change.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-20 12:06:11 -03:00
Rafael Zalamena 8f829b2495 pimd: remove temporary variables from MSDP peer
Remove from MSDP peer data structure two temporary variables
that should only be used when calling library functions.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-11-20 12:06:00 -03:00
Nathan Bahr 13c0722b5c tests: PIM AutoRP tests expanded
Now with a full AutoRP implementation, we can test AutoRP in a full network setup
beginning with candidate RP announcements all the way through discovery and active RP
selection.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Nathan Bahr b6aa71b59b pimd: Implement autorp mapping agent
Fully flushed out the AutoRP implementation now with the AutoRP mapping agent.
This touched most of AutoRP in order to have common reuse of containers for each
section of AutoRP operation (Candidate RP announcement, Mapping agent, Discovery).
Many debugs had guards added and many more debug logs added.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Nathan Bahr a060c72530 pimd: Implement autorp mapping agent CLI
Also exposes BSR cand_addrsel methods for use in AutoRP.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Nathan Bahr bd9331e0ae pimd,yang: Add PIMD northbound/yang for AutoRP mapping agent
Reuses the candidate selection logic from BSR configuration

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-11-19 22:33:11 +00:00
Mark Stapp f511530788 bfdd: retain remote dplane client socket
When using bfd in remote-dataplane client mode, don't close
a new client socket if we're going to try to use it.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2024-11-19 14:54:06 -05:00
Donald Sharp 172a2aa533
Merge pull request #17156 from opensourcerouting/eradicate-strncpy
*: remove remaining `strncpy()` users
2024-11-19 09:42:39 -05:00
Donald Sharp a959c3fe9e
Merge pull request #17414 from dmytroshytyi-6WIND/srv6_isisd_fix_display_algorithm
isisd: properly display srv6 algorithm
2024-11-19 09:30:36 -05:00
Donald Sharp 26b0cca95d
Merge pull request #17453 from opensourcerouting/fix/raw_python_clippy
tools: Fix syntax raw parsing for make-foobar helper
2024-11-19 09:28:32 -05:00