]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 months agobgpd: fix version attribute is an int, not a string 17506/head
Philippe Guibert [Mon, 25 Nov 2024 21:47:21 +0000 (22:47 +0100)]
bgpd: fix version attribute is an int, not a string

The json display of the version attribute is originally an
integer. It has changed, most probably mistakenly.

> {
>   "vrfId": 7,
>   "vrfName": "vrf1",
>   "tableVersion": 3,
>   "routerId": "192.0.2.1",
>   "defaultLocPrf": 100,
>   "localAS": 65500,
>   "routes": {
>     "172.31.0.1/32": {
>       "prefix": "172.31.0.1/32",
>       "version": "1", <--- int or string ??

Let us fix it, by using the integer display instead.

Fixes: f9f2d188e398 ("bgpd: fix 'json detail' output structure")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 months agoMerge pull request #17369 from louis-6wind/bgp_vpnv4_route_leak_basic
Donatas Abraitis [Mon, 25 Nov 2024 13:25:14 +0000 (15:25 +0200)]
Merge pull request #17369 from louis-6wind/bgp_vpnv4_route_leak_basic

tests: add bgp_vpnv4_route_leak_basic

5 months agoMerge pull request #17498 from cscarpitta/fix/fix-frr-reload-2
Donald Sharp [Sun, 24 Nov 2024 13:49:20 +0000 (08:49 -0500)]
Merge pull request #17498 from cscarpitta/fix/fix-frr-reload-2

tools: Add missing keyword `encapsulation` in frr-reload

5 months agoMerge pull request #17495 from Orange-OpenSource/ospf-sr
Donald Sharp [Sun, 24 Nov 2024 13:48:36 +0000 (08:48 -0500)]
Merge pull request #17495 from Orange-OpenSource/ospf-sr

ospfd: Correct invalid SR-MPLS output label

5 months agotools: Add missing keyword `encapsulation` in frr-reload 17498/head
Carmine Scarpitta [Sun, 24 Nov 2024 08:37:22 +0000 (09:37 +0100)]
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>
5 months agoospfd: Correct invalid SR-MPLS output label 17495/head
Olivier Dugeon [Sat, 23 Nov 2024 17:50:21 +0000 (18:50 +0100)]
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>
5 months agoMerge pull request #17459 from opensourcerouting/fix/disable_rpki_community_by_default
Donald Sharp [Sat, 23 Nov 2024 14:13:06 +0000 (09:13 -0500)]
Merge pull request #17459 from opensourcerouting/fix/disable_rpki_community_by_default

bgpd: Disable sending ROV extended community by default

5 months agoMerge pull request #17493 from cscarpitta/fix/fix-frr-reload
Donald Sharp [Sat, 23 Nov 2024 14:11:45 +0000 (09:11 -0500)]
Merge pull request #17493 from cscarpitta/fix/fix-frr-reload

tools: Add missing keywords in frr-reload

5 months agotools: Add missing keyword `node-msd` in frr-reload 17493/head
Carmine Scarpitta [Sat, 23 Nov 2024 07:46:50 +0000 (08:46 +0100)]
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>
5 months agotools: Add missing keyword `segment-routing srv6` in frr-reload
Carmine Scarpitta [Sat, 23 Nov 2024 07:46:00 +0000 (08:46 +0100)]
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>
5 months agoMerge pull request #17492 from donaldsharp/zebra_nh_label_crash
Mark Stapp [Fri, 22 Nov 2024 20:41:32 +0000 (15:41 -0500)]
Merge pull request #17492 from donaldsharp/zebra_nh_label_crash

lib, zebra: Do not have duplicate memory type problems

5 months agolib, zebra: Do not have duplicate memory type problems 17492/head
Donald Sharp [Fri, 22 Nov 2024 16:02:15 +0000 (11:02 -0500)]
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>
5 months agoMerge pull request #17487 from opensourcerouting/fix/do_reset_peers
Donald Sharp [Fri, 22 Nov 2024 15:15:46 +0000 (10:15 -0500)]
Merge pull request #17487 from opensourcerouting/fix/do_reset_peers

bgpd: Do not reset peers on suppress-fib toggling

5 months agoMerge pull request #17484 from csiltala/pim-support-bundle
Donald Sharp [Fri, 22 Nov 2024 14:46:08 +0000 (09:46 -0500)]
Merge pull request #17484 from csiltala/pim-support-bundle

tools: Add pim show commands to support bundle

5 months agobgpd: Do not reset peers on suppress-fib toggling 17487/head
Donatas Abraitis [Fri, 22 Nov 2024 08:30:37 +0000 (10:30 +0200)]
bgpd: Do not reset peers on suppress-fib toggling

If the desired state is the same - do nothing instead of resetting once again.

Fixes: bdb5ae8bce94432eb5e581f04f48dc4aa5db7ca4 ("bgpd: Make suppress-fib-pending clear peering")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agotools: Add pim show commands to support bundle 17484/head
Corey Siltala [Thu, 21 Nov 2024 16:44:23 +0000 (10:44 -0600)]
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>
5 months agoMerge pull request #17477 from donaldsharp/topo_connected_installed
Jafar Al-Gharaibeh [Thu, 21 Nov 2024 20:28:23 +0000 (14:28 -0600)]
Merge pull request #17477 from donaldsharp/topo_connected_installed

tests: Ensure connected routes are installed before continuing

5 months agoMerge pull request #17473 from donaldsharp/bgp_bmp_and_its_ilk
Jafar Al-Gharaibeh [Thu, 21 Nov 2024 20:17:48 +0000 (14:17 -0600)]
Merge pull request #17473 from donaldsharp/bgp_bmp_and_its_ilk

Bgp bfd and its ilk

5 months agoMerge pull request #17340 from nabahr/mapping-agent
Rafael Zalamena [Thu, 21 Nov 2024 19:10:42 +0000 (16:10 -0300)]
Merge pull request #17340 from nabahr/mapping-agent

PIMD: Implement AutoRP mapping-agent

5 months agoMerge pull request #17469 from opensourcerouting/msdp-logs
Donald Sharp [Thu, 21 Nov 2024 18:45:58 +0000 (13:45 -0500)]
Merge pull request #17469 from opensourcerouting/msdp-logs

pimd: MSDP logging improvements

5 months agoMerge pull request #17476 from donaldsharp/support_bundle_isis
Mark Stapp [Thu, 21 Nov 2024 18:15:51 +0000 (13:15 -0500)]
Merge pull request #17476 from donaldsharp/support_bundle_isis

Support bundle isis

5 months agoMerge pull request #17436 from LabNConsulting/aceelindem/ospf-multi-instance-default
Russ White [Thu, 21 Nov 2024 17:20:26 +0000 (09:20 -0800)]
Merge pull request #17436 from LabNConsulting/aceelindem/ospf-multi-instance-default

ospfd: OSPF multi-instance default origination fixes

5 months agotests: Ensure connected routes are installed before continuing 17477/head
Donald Sharp [Thu, 21 Nov 2024 14:26:52 +0000 (09:26 -0500)]
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>
5 months agotools: Add pim msdp show commands to support bundle 17476/head
Donald Sharp [Thu, 21 Nov 2024 14:16:14 +0000 (09:16 -0500)]
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>
5 months agotools: Add zebra label show commands to support bundle
Donald Sharp [Thu, 21 Nov 2024 14:15:22 +0000 (09:15 -0500)]
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>
5 months agotools: Add isis command generation to support bundle
Donald Sharp [Thu, 21 Nov 2024 14:14:19 +0000 (09:14 -0500)]
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>
5 months agotools: Add bmp command to support bundle generation
Donald Sharp [Thu, 21 Nov 2024 14:13:24 +0000 (09:13 -0500)]
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>
5 months agotopotests: test new log toggle 17469/head
Rafael Zalamena [Thu, 21 Nov 2024 13:23:37 +0000 (10:23 -0300)]
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>
5 months agopimd,yang: log MSDP SA events
Rafael Zalamena [Thu, 26 May 2022 14:22:27 +0000 (11:22 -0300)]
pimd,yang: log MSDP SA events

Add new command to log all SA events.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agopimd,yang: log MSDP neighbor events
Rafael Zalamena [Thu, 26 May 2022 12:54:27 +0000 (09:54 -0300)]
pimd,yang: log MSDP neighbor events

Move MSDP neighbor events global debug to per PIM instance.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agotests: add bgp_vpnv4_route_leak_basic 17369/head
Louis Scalbert [Tue, 5 Nov 2024 16:13:38 +0000 (17:13 +0100)]
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>
5 months agoMerge pull request #17468 from opensourcerouting/msdp-tweaks
Jafar Al-Gharaibeh [Thu, 21 Nov 2024 03:56:14 +0000 (21:56 -0600)]
Merge pull request #17468 from opensourcerouting/msdp-tweaks

pimd: two small improvements

5 months agobgpd: Allow bfd to work if peer known but interface address not yet 17473/head
Donald Sharp [Wed, 20 Nov 2024 21:07:34 +0000 (16:07 -0500)]
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>
5 months agotests: zebra_fec_nexthop_resolution improve
Donald Sharp [Wed, 20 Nov 2024 14:22:46 +0000 (09:22 -0500)]
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>
5 months agobgpd: bgp_connect should return an `enum connect_result`
Donald Sharp [Wed, 20 Nov 2024 14:18:39 +0000 (09:18 -0500)]
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>
5 months agoMerge pull request #17464 from mjstapp/fix_bfdd_dplane_client_conn
Rafael Zalamena [Wed, 20 Nov 2024 15:35:13 +0000 (12:35 -0300)]
Merge pull request #17464 from mjstapp/fix_bfdd_dplane_client_conn

bfdd: retain remote dplane client socket

5 months agopimd: constify peer lookup function 17468/head
Rafael Zalamena [Fri, 8 Jul 2022 19:09:10 +0000 (16:09 -0300)]
pimd: constify peer lookup function

Make parameter `const` to document that the variable will not change.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agopimd: remove temporary variables from MSDP peer
Rafael Zalamena [Fri, 27 May 2022 20:15:46 +0000 (17:15 -0300)]
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>
5 months agotests: PIM AutoRP tests expanded 17340/head
Nathan Bahr [Fri, 1 Nov 2024 19:15:52 +0000 (19:15 +0000)]
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>
5 months agopimd: Implement autorp mapping agent
Nathan Bahr [Fri, 1 Nov 2024 19:14:47 +0000 (19:14 +0000)]
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>
5 months agopimd: Implement autorp mapping agent CLI
Nathan Bahr [Fri, 1 Nov 2024 19:11:14 +0000 (19:11 +0000)]
pimd: Implement autorp mapping agent CLI

Also exposes BSR cand_addrsel methods for use in AutoRP.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agopimd,yang: Add PIMD northbound/yang for AutoRP mapping agent
Nathan Bahr [Fri, 1 Nov 2024 19:09:37 +0000 (19:09 +0000)]
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>
5 months agobfdd: retain remote dplane client socket 17464/head
Mark Stapp [Tue, 19 Nov 2024 19:54:06 +0000 (14:54 -0500)]
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>
5 months agoMerge pull request #17156 from opensourcerouting/eradicate-strncpy
Donald Sharp [Tue, 19 Nov 2024 14:42:39 +0000 (09:42 -0500)]
Merge pull request #17156 from opensourcerouting/eradicate-strncpy

*: remove remaining `strncpy()` users

5 months agoMerge pull request #17414 from dmytroshytyi-6WIND/srv6_isisd_fix_display_algorithm
Donald Sharp [Tue, 19 Nov 2024 14:30:36 +0000 (09:30 -0500)]
Merge pull request #17414 from dmytroshytyi-6WIND/srv6_isisd_fix_display_algorithm

isisd: properly display srv6 algorithm

5 months agoMerge pull request #17453 from opensourcerouting/fix/raw_python_clippy
Donald Sharp [Tue, 19 Nov 2024 14:28:32 +0000 (09:28 -0500)]
Merge pull request #17453 from opensourcerouting/fix/raw_python_clippy

tools: Fix syntax raw parsing for make-foobar helper

5 months agobgpd: Disable sending ROV extended community by default 17459/head
Donatas Abraitis [Tue, 19 Nov 2024 14:25:12 +0000 (16:25 +0200)]
bgpd: Disable sending ROV extended community by default

https://datatracker.ietf.org/doc/html/rfc8097 defines ROV extended community,
but https://datatracker.ietf.org/doc/draft-ietf-sidrops-avoid-rpki-state-in-bgp
is against sending it by default even for iBGP peers.

Let's do this practice and reverse it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17455 from opensourcerouting/erp-cs
Donald Sharp [Tue, 19 Nov 2024 14:25:04 +0000 (09:25 -0500)]
Merge pull request #17455 from opensourcerouting/erp-cs

pim6d: fix coverity scan warning

5 months agoMerge pull request #17456 from opensourcerouting/fix/lua_unit_test
Donald Sharp [Tue, 19 Nov 2024 14:24:40 +0000 (09:24 -0500)]
Merge pull request #17456 from opensourcerouting/fix/lua_unit_test

Lua casting

5 months agoMerge pull request #17457 from opensourcerouting/fix/optimize_community_alias_lookup
Donald Sharp [Tue, 19 Nov 2024 14:10:33 +0000 (09:10 -0500)]
Merge pull request #17457 from opensourcerouting/fix/optimize_community_alias_lookup

bgpd: Optimize the way parsing communities if no community alias exists

5 months agobgpd: Optimize the way parsing communities if no community alias exists 17457/head
Donatas Abraitis [Mon, 18 Nov 2024 21:29:53 +0000 (23:29 +0200)]
bgpd: Optimize the way parsing communities if no community alias exists

If at least one community alias is configured, then let's do the work,
otherwise we don't need to spend time on splitting stuff and creating
a new string.

This should improve the performance.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17375 from opensourcerouting/fix/use_pcre2
Donald Sharp [Mon, 18 Nov 2024 17:34:18 +0000 (12:34 -0500)]
Merge pull request #17375 from opensourcerouting/fix/use_pcre2

packaging: Use PCRE2 for .deb/.rpm builds

5 months agotests: Add topotest for OSPF multi-instance default origination. 17436/head
Acee Lindem [Mon, 18 Nov 2024 17:05:31 +0000 (17:05 +0000)]
tests: Add topotest for OSPF multi-instance default origination.

This change adds a topotest to test various case of OSPF multi-instance
origination including cases where the criteria route is from another
instance of OSPF, as well as the same OSPF instance (where a default
should not be originated).

Signed-off-by: Acee Lindem <acee@lindem.com>
5 months agobgpd: Use int, not long long for route-map action in Lua script 17456/head
Donatas Abraitis [Mon, 18 Nov 2024 14:08:30 +0000 (16:08 +0200)]
bgpd: Use int, not long long for route-map action in Lua script

This is an issue for big-endian architectures, that causes incorrect castings.

lua_tointegerp() uses int*, not long long*.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agolib: Fix Lua script unit test
Donatas Abraitis [Mon, 18 Nov 2024 09:10:05 +0000 (11:10 +0200)]
lib: Fix Lua script unit test

When building for big-endian architectures, this is failing because of
long long / int casting issues, let's use a separate integer to get the
results.

This is especially important when building the Docker images for multiple arches.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agopim6d: fix coverity scan warning 17455/head
Rafael Zalamena [Mon, 18 Nov 2024 12:17:32 +0000 (09:17 -0300)]
pim6d: fix coverity scan warning

Fix Coverity Scan CID 1601875: use the return value to tell user about
the availability of a next hop to the learned RP (needs debug enabled).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agotools: Fix syntax raw parsing for make-foobar helper 17453/head
Donatas Abraitis [Mon, 18 Nov 2024 09:04:27 +0000 (11:04 +0200)]
tools: Fix syntax raw parsing for make-foobar helper

96 38.93 config.status: creating Makefile
96 39.48 /src/python/makefile.py:55: SyntaxWarning: invalid escape sequence '\s'
96 39.48   "^#\s*include.*_clippy.c",

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17451 from opensourcerouting/fix/bgp_optimizations
Donald Sharp [Sun, 17 Nov 2024 17:03:52 +0000 (12:03 -0500)]
Merge pull request #17451 from opensourcerouting/fix/bgp_optimizations

bgpd: Optimize the outbound path if RFC8212 is applied

5 months agoospfd: OSPF multi-instance default origination fixes
Acee Lindem [Fri, 15 Nov 2024 18:58:49 +0000 (18:58 +0000)]
ospfd: OSPF multi-instance default origination fixes

When originating a default AS-External LSA in one OSPF instance,
it wasn't working if the criteria route was installed by another OSPF
instance. This required more flexible processing of the OSPF external
route information.

Also fix problem multi-instance display for "show ip ospf
 <instance> database ...".

Signed-off-by: Acee Lindem <acee@lindem.com>
5 months agobgpd: Optimize the outbound path if RFC8212 is applied 17451/head
Donatas Abraitis [Sun, 17 Nov 2024 12:41:05 +0000 (14:41 +0200)]
bgpd: Optimize the outbound path if RFC8212 is applied

If we have (default enabled) enabled `bgp ebgp-require-policy`, then first check
it before applying the route-maps.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17445 from cscarpitta/fix/sharp-use-ipv6-max-bitlen
Donatas Abraitis [Sun, 17 Nov 2024 12:19:58 +0000 (14:19 +0200)]
Merge pull request #17445 from cscarpitta/fix/sharp-use-ipv6-max-bitlen

sharpd: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen

5 months agoMerge pull request #17444 from cscarpitta/fix/sharpd-cli-help-string
Donatas Abraitis [Sun, 17 Nov 2024 12:19:38 +0000 (14:19 +0200)]
Merge pull request #17444 from cscarpitta/fix/sharpd-cli-help-string

sharpd: Fix a few typos in CLI help messages

5 months agosharpd: Use IPV6_MAX_BITLEN in `sharp send opaque notify` 17445/head
Carmine Scarpitta [Sun, 17 Nov 2024 07:24:44 +0000 (08:24 +0100)]
sharpd: Use IPV6_MAX_BITLEN in `sharp send opaque notify`

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agosharpd: Use IPV6_MAX_BITLEN in `sharp install seg6local-routes`
Carmine Scarpitta [Sun, 17 Nov 2024 07:24:18 +0000 (08:24 +0100)]
sharpd: Use IPV6_MAX_BITLEN in `sharp install seg6local-routes`

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agosharpd: Fix typo in `sharp install seg6local-routes` help message 17444/head
Carmine Scarpitta [Sun, 17 Nov 2024 07:16:26 +0000 (08:16 +0100)]
sharpd: Fix typo in `sharp install seg6local-routes` help message

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agosharpd: Fix typo in `sharp install seg6-routes` help message
Carmine Scarpitta [Sun, 17 Nov 2024 07:15:51 +0000 (08:15 +0100)]
sharpd: Fix typo in `sharp install seg6-routes` help message

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agosharpd: Fix typo in `sharp install routes` help message
Carmine Scarpitta [Sun, 17 Nov 2024 07:13:53 +0000 (08:13 +0100)]
sharpd: Fix typo in `sharp install routes` help message

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agoMerge pull request #17193 from opensourcerouting/frr-name-use
Jafar Al-Gharaibeh [Sun, 17 Nov 2024 01:35:08 +0000 (19:35 -0600)]
Merge pull request #17193 from opensourcerouting/frr-name-use

accords: guidelines/terms for FRRouting trademarks

5 months agoMerge pull request #17427 from opensourcerouting/fix/more_details_for_ebgp_no_policy
Jafar Al-Gharaibeh [Sun, 17 Nov 2024 01:32:54 +0000 (19:32 -0600)]
Merge pull request #17427 from opensourcerouting/fix/more_details_for_ebgp_no_policy

bgpd: Add more details to ebgp requires policy warning

5 months agoMerge pull request #17435 from opensourcerouting/fix/bgp_allow_0.0.0.0_if_multiple_nl...
Jafar Al-Gharaibeh [Sun, 17 Nov 2024 01:32:04 +0000 (19:32 -0600)]
Merge pull request #17435 from opensourcerouting/fix/bgp_allow_0.0.0.0_if_multiple_nlris_exist

bgpd: Validate both nexthop information (NEXTHOP and NLRI)

5 months agoMerge pull request #16937 from opensourcerouting/embedded-rp
Jafar Al-Gharaibeh [Sun, 17 Nov 2024 01:30:20 +0000 (19:30 -0600)]
Merge pull request #16937 from opensourcerouting/embedded-rp

pim6d: support embedded-rp

5 months agoMerge pull request #17432 from raja-rajasekar/rajasekarr/evpn_pop_items_bp
Donatas Abraitis [Sat, 16 Nov 2024 10:51:20 +0000 (12:51 +0200)]
Merge pull request #17432 from raja-rajasekar/rajasekarr/evpn_pop_items_bp

bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers

5 months agobgpd: Validate both nexthop information (NEXTHOP and NLRI) 17435/head
Donatas Abraitis [Fri, 15 Nov 2024 07:54:07 +0000 (09:54 +0200)]
bgpd: Validate both nexthop information (NEXTHOP and NLRI)

If we receive an IPv6 prefix e.g.: 2001:db8:100::/64 with nextop: 0.0.0.0, and
mp_nexthop: fc00::2, we should not treat this with an invalid nexthop because
of 0.0.0.0. We MUST check for MP_REACH attribute also and decide later if we
have at least one a valid nexthop.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agotests: Check if IPv6 prefix has a valid nexthop if multiple NLRIs exist
Donatas Abraitis [Fri, 15 Nov 2024 07:53:38 +0000 (09:53 +0200)]
tests: Check if IPv6 prefix has a valid nexthop if multiple NLRIs exist

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17434 from opensourcerouting/fix/bgp_color_parsing_ecomm
Donald Sharp [Fri, 15 Nov 2024 14:21:52 +0000 (09:21 -0500)]
Merge pull request #17434 from opensourcerouting/fix/bgp_color_parsing_ecomm

bgpd: Fix color extended community parsing

5 months agobgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers 17432/head
Rajasekar Raja [Thu, 14 Nov 2024 07:09:55 +0000 (23:09 -0800)]
bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers

In cases such as 'no advertise-all-vni' and L2 VNI DELETE, we need to
pop all the VPN routes present in the bgp_zebra_announce FIFO yet to
be processed regardless of VNI is configured or not.

NOTE: NO need to pop the VPN routes in two cases
 1) In free_vni_entry
   - Called by bgp_free()->bgp_evpn_cleanup().
   - Since bgp_delete is called before bgp_free and we pop all the dest
     pertaining to bgp under delete.
 2) evpn_delete_vni() when user configures "no vni" since the withdraw
    of all routes happen in normal cycle.

Fixes: a07df6f7548f6bd1b92acbb7a10c3823de33fe5f
("bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation")

Ticket :#4163611

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
5 months agobgpd: Use tmp_as when parsing color extended community 17434/head
Donatas Abraitis [Fri, 15 Nov 2024 06:16:10 +0000 (08:16 +0200)]
bgpd: Use tmp_as when parsing color extended community

as is not initialized and it's assigned only later.

CID: 1601739

Fixes: 937cf4d ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoRevert "bgpd: Fix color extended community parsing"
Donatas Abraitis [Fri, 15 Nov 2024 06:14:32 +0000 (08:14 +0200)]
Revert "bgpd: Fix color extended community parsing"

This reverts commit 8e771bda840e189eed2851f63ad80cb1a235f40f.

5 months agobgpd: Add more details to ebgp requires policy warning 17427/head
Donatas Abraitis [Fri, 15 Nov 2024 06:09:08 +0000 (08:09 +0200)]
bgpd: Add more details to ebgp requires policy warning

This will tell explicitly which peer does not have a filter applied.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17433 from donaldsharp/zebra_debug_assert
Jafar Al-Gharaibeh [Fri, 15 Nov 2024 03:52:49 +0000 (21:52 -0600)]
Merge pull request #17433 from donaldsharp/zebra_debug_assert

Zebra debug assert

5 months agoMerge pull request #17429 from opensourcerouting/fix/unsupported_commands_bgpd
Donald Sharp [Fri, 15 Nov 2024 00:47:44 +0000 (19:47 -0500)]
Merge pull request #17429 from opensourcerouting/fix/unsupported_commands_bgpd

bgpd: Drop unsupported commands

5 months agozebra: Put debug guards in zebra_vxlan.c 17433/head
Donald Sharp [Thu, 14 Nov 2024 21:08:47 +0000 (16:08 -0500)]
zebra: Put debug guards in zebra_vxlan.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agozebra: zebra_vxlan.c assert on dev escape problem
Donald Sharp [Thu, 14 Nov 2024 21:02:18 +0000 (16:02 -0500)]
zebra: zebra_vxlan.c assert on dev escape problem

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agozebra: Missed debug guard in zebra_evpn.c
Donald Sharp [Thu, 14 Nov 2024 20:59:36 +0000 (15:59 -0500)]
zebra: Missed debug guard in zebra_evpn.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Depracate no_synchronization_cmd, no_auto_summary_cmd commands 17429/head
Donatas Abraitis [Thu, 14 Nov 2024 14:12:19 +0000 (16:12 +0200)]
bgpd: Depracate no_synchronization_cmd, no_auto_summary_cmd commands

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17422 from opensourcerouting/fix/coverity_bgp_color
Mark Stapp [Thu, 14 Nov 2024 13:27:47 +0000 (08:27 -0500)]
Merge pull request #17422 from opensourcerouting/fix/coverity_bgp_color

bgpd: Fix color extended community parsing

5 months agoMerge pull request #17426 from mjstapp/fix_z_evpn_debug
Donatas Abraitis [Thu, 14 Nov 2024 07:06:57 +0000 (09:06 +0200)]
Merge pull request #17426 from mjstapp/fix_z_evpn_debug

zebra: fix unguarded debug in evpn code

5 months agoMerge pull request #17423 from opensourcerouting/fix/show_advertised_routes_plain_wit...
Donald Sharp [Wed, 13 Nov 2024 20:50:39 +0000 (15:50 -0500)]
Merge pull request #17423 from opensourcerouting/fix/show_advertised_routes_plain_with_addpath

bgpd: Show neighbor advertised paths including addpath

5 months agozebra: fix unguarded debug in evpn code 17426/head
Mark Stapp [Wed, 13 Nov 2024 18:49:28 +0000 (13:49 -0500)]
zebra: fix unguarded debug in evpn code

Guard a debug in the evpn code.

Signed-off-by: Mark Stapp <mjs@cisco.com>
5 months agopimd: prevent invalid memory access 16937/head
Rafael Zalamena [Sun, 29 Sep 2024 20:31:06 +0000 (17:31 -0300)]
pimd: prevent invalid memory access

Signalize termination to functions so they can avoid accessing pointers
that might be no longer available.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agopimd: fix check-patch warning
Rafael Zalamena [Sun, 29 Sep 2024 18:57:28 +0000 (15:57 -0300)]
pimd: fix check-patch warning

Remove unnecessary braces.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agopim6d: fix channel oil leak on embedded RP
Rafael Zalamena [Sun, 29 Sep 2024 14:04:39 +0000 (11:04 -0300)]
pim6d: fix channel oil leak on embedded RP

When a multicast route is created with embedded RP the channel oil
never gets decremented when `clear ipv6 mroute` is called.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agodoc: document and explain PIM embedded RP
Rafael Zalamena [Wed, 2 Oct 2024 12:19:28 +0000 (09:19 -0300)]
doc: document and explain PIM embedded RP

Let user know about PIM embedded RP configuration commands.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agotopotests: new embedded RP topology test
Rafael Zalamena [Fri, 27 Sep 2024 04:00:52 +0000 (01:00 -0300)]
topotests: new embedded RP topology test

Test embedded RP features:
- Embedded RP itself
- Embedded RP group list filtering
- Embedded RP limit

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agopim6d: support embedded-rp
Rafael Zalamena [Wed, 2 Oct 2024 12:22:48 +0000 (09:22 -0300)]
pim6d: support embedded-rp

Implement embedded RP support and configuration commands.

Embedded RP is disabled by default and can be globally enabled with the
command `embedded-rp` in the PIMv6 configuration node.

It supports the following options:
- Embedded RP maximum limit
- Embedded RP group filtering

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 months agobgpd: Reduce the nesting level for show_adj_route() 17423/head
Donatas Abraitis [Wed, 13 Nov 2024 11:36:01 +0000 (13:36 +0200)]
bgpd: Reduce the nesting level for show_adj_route()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Show neighbor advertised paths including addpath
Donatas Abraitis [Wed, 13 Nov 2024 09:47:33 +0000 (11:47 +0200)]
bgpd: Show neighbor advertised paths including addpath

Without the patch only the best path is displayed.

With the patch, display all paths including addpaths, but only for non-JSON
output to avoid breaking existing output.

E.g.:

```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
     Network          Next Hop            Metric LocPrf Weight Path
 *>  172.16.16.254/32 192.168.2.3              0             0 65003 ?
 *   172.16.16.254/32 192.168.2.4              0             0 65004 ?
 *>  192.168.2.0/24   192.168.2.3              0             0 65003 ?
 *   192.168.2.0/24   192.168.2.4              0             0 65004 ?
```

Before it was:

```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
     Network          Next Hop            Metric LocPrf Weight Path
 *>  172.16.16.254/32 192.168.2.3              0             0 65003 ?
 *>  192.168.2.0/24   192.168.2.3              0             0 65003 ?
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Fix color extended community parsing 17422/head
Donatas Abraitis [Wed, 13 Nov 2024 08:03:17 +0000 (10:03 +0200)]
bgpd: Fix color extended community parsing

CID: 1601739

Fixes: 937cf4db1738d768ed7dac8677d16f7585bb75de ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17331 from Jafaral/ospf-instance
Russ White [Tue, 12 Nov 2024 23:00:46 +0000 (18:00 -0500)]
Merge pull request #17331 from Jafaral/ospf-instance

tests: add support for ospf instances  with unified configs

5 months agoMerge pull request #17205 from piotrjurkiewicz/patch-1
Jafar Al-Gharaibeh [Tue, 12 Nov 2024 22:13:27 +0000 (16:13 -0600)]
Merge pull request #17205 from piotrjurkiewicz/patch-1

debian: Add missing libprotobuf-dev to grpc profile