Commit Graph

36924 Commits

Author SHA1 Message Date
Donald Sharp
7aa65cfefc lib: Allow setsockopt functions to return size set
When finding a send/receive buffer size that is usable
let's report how big we were able to set it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit d5615fd6f8)
2024-12-04 12:47:34 +00:00
Donald Sharp
0b26493ea6
Merge pull request #17574 from opensourcerouting/fix/backports_fix_branch
Stabilize stable/10.2
2024-12-04 07:37:00 -05:00
Donatas Abraitis
595a608498 bgpd: Initialize as_type for peer-group as AS_UNSPECIFIED
Previously AS_UNSPECIFIED was treated as 0, but with now it's 1 after renumbering
peer_asn_type enum.

Fixes: 0dfe25697f ("bgpd: Implement neighbor X remote-as auto")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e57fb3282a)
2024-12-04 08:55:48 +02:00
Corey Siltala
93e7c2ea81 pimd: Fix access-list memory leak in pimd
Reset access-lists in pimd on terminate

Signed-off-by: Corey Siltala <csiltala@atcorp.com>
(cherry picked from commit d21a993f16)
2024-12-04 08:55:39 +02:00
Donald Sharp
86b10095a7 lib: Fix session re-establishment
Currently if you have this sequence of events:

a) BGP starts
b) BGP reads cli that has bfd configuration
c) BGP attempts to install bfd configuration but fails because
zebra is not connected to yet
d) BGP connects to zebra
e) BGP receives resend bfd code from bfdd
f) BGP was not sending down the unsent data to bfd, never causing
the bfd session to be established.

So effectively bfd was attempting to install but failed
and then when it was asked to replay everything it decided
that the bfd information for a particular peer was actually
installed and does not need to be resent.  Modify the code
such that the bfd code now tracks failed installation and
allows the resend of data to bfdd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-12-04 08:55:32 +02:00
Donatas Abraitis
953fc0c6cb Revert "tests: Add topotest for OSPF multi-instance default origination."
This reverts commit f10d238869.

Reverting because it causes failures for stable/10.2 due to multi OSPF instances
support for frr.conf (unified configuration).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-04 08:54:18 +02:00
Donatas Abraitis
1e23469c99
Merge pull request #17522 from FRRouting/mergify/bp/stable/10.2/pr-17510
bgpd: fix use single whitespace when displaying flowspec entries (backport #17510)
2024-11-28 07:53:22 +02:00
Russ White
80318865a1
Merge pull request #17478 from FRRouting/mergify/bp/stable/10.2/pr-17436
ospfd: OSPF multi-instance default origination fixes (backport #17436)
2024-11-26 13:56:29 -05:00
Donatas Abraitis
1cbd065339
Merge pull request #17517 from FRRouting/mergify/bp/stable/10.2/pr-17501
bgpd: Fix Graceful-Restart for peer-groups (backport #17501)
2024-11-26 20:40:44 +02:00
Philippe Guibert
8cbd80ac8f bgpd: fix use single whitespace when displaying flowspec entries
There is an extra space in the 'Displayed' line of show bgp command,
that should not be present.
Fix this by being consistent with the output of the other address
families.

Fixes: ("a1baf9e84f71") bgpd: Use single whitespace when displaying show bgp summary
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 561debab54)
2024-11-26 18:12:38 +00:00
Russ White
e3048179b1
Merge pull request #17511 from FRRouting/mergify/bp/stable/10.2/pr-17506
bgpd: fix version attribute is an int, not a string (backport #17506)
2024-11-26 11:37:44 -05:00
Donatas Abraitis
04ffcc23f0 tests: Check if GR settings are inherited for peer-groups
Convert to unified config also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit a4bfa8c574)
2024-11-26 16:00:55 +00:00
Donatas Abraitis
aeda7dc4ba bgpd: Use gracefulRestart JSON field
Deprecate gracefulRestartCapability which is inconsistent with an existing
format if advertised and received are printed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ee5893ff59)
2024-11-26 16:00:55 +00:00
Donatas Abraitis
ea4ebd70c5 bgpd: Fix graceful-restart for peer-groups
Slipped somehow that peer-groups with GR is just completely broken, but it was
working before.

Strikes again, that we MUST have more and more topotests.

Fixes: 15403f521a ("bgpd: Streamline GR config, act on change immediately")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 0a85b1ba04)
2024-11-26 16:00:54 +00:00
Philippe Guibert
eab2cf6522 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: f9f2d188e3 ("bgpd: fix 'json detail' output structure")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit c5d7815ccc)
2024-11-26 13:30:13 +00:00
Donald Sharp
c9975e1525
Merge pull request #17488 from FRRouting/mergify/bp/stable/10.2/pr-17487
bgpd: Do not reset peers on suppress-fib toggling (backport #17487)
2024-11-22 18:33:59 -05:00
Donatas Abraitis
f62baf6ca9 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>
(cherry picked from commit 7fb4c03f5b)
2024-11-22 15:17:28 +00:00
Acee Lindem
f10d238869 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>
(cherry picked from commit 82f4349402)
2024-11-21 17:21:18 +00:00
Acee Lindem
7677309e8b 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>
(cherry picked from commit 6afd56da96)
2024-11-21 17:21:18 +00:00
Jafar Al-Gharaibeh
a414010917
Merge pull request #17470 from FRRouting/mergify/bp/stable/10.2/pr-17464
bfdd: retain remote dplane client socket (backport #17464)
2024-11-20 21:53:47 -06:00
Mark Stapp
be09cbaf86 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>
(cherry picked from commit f511530788)
2024-11-20 19:06:18 +00:00
Jafar Al-Gharaibeh
60982c4e48
Merge pull request #17446 from opensourcerouting/fix/backport_65a43b57efd60c4fdf80c935750046ba861ec79f_10.2
bgpd: Validate both nexthop information (NEXTHOP and NLRI) (backport)
2024-11-19 23:27:54 -06:00
Donatas Abraitis
91f482a854
Merge pull request #17437 from FRRouting/mergify/bp/stable/10.2/pr-17432
bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers (backport #17432)
2024-11-19 22:47:55 +01:00
Donatas Abraitis
863d1ddc21 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>
(cherry picked from commit a0d2734e87)
2024-11-17 11:16:05 +02:00
Rajasekar Raja
a7aae788ec 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: a07df6f754
("bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation")

Ticket :#4163611

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
(cherry picked from commit 898852f269)
2024-11-16 10:53:01 +00:00
Jafar Al-Gharaibeh
22746b8d59 FRR Release 10.2
New Features Highlight:

- PIM candidate BSR/RP [#16438]
- Static IGMP join without an IGMP report [1#6450]
- PIM AutoRP discovery/announcements [#16634]
- IGMP proxy [#16861]
- SRv6 SID Manager [#15604]
- Add `bgp ipv6-auto-ra` command [#16354]
- Implement `neighbor x remote-as auto` for BGP [#16345]
- Implement `bgp dual-as` for BGP [#16816]
- Implement BGP-wide configuration for graceful restart [#16099]
- Handle kernel routes appropriately (should fix recent NOPREFIXROUTE issue) [#16300]
- Add `cisco-authentication` password support for NHRP [#16172]

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-11-12 10:20:46 -06:00
Jafar Al-Gharaibeh
2badb569be debian, redhat: updating changelog for 10.2 release
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-11-12 10:20:37 -06:00
Russ White
b96421690c
Merge pull request #17411 from FRRouting/mergify/bp/stable/10.2/pr-17409
bgpd: fix resolvedPrefix in show nexthop json output (backport #17409)
2024-11-12 10:03:45 -05:00
Krishnasamy R
ffc5f32789 bgpd: fix resolvedPrefix in show nexthop json output
While populating  the nexthop info for "show bgp nexthop json", resolvedPrefix
is added in parent json object instead of json_nexthop object.
This results in displaying wrong resolvedPrefix for nexthops.
Fixing the same by adding resolvedPrefix to json_nexthop object, so that
the proper resolvedPrefix would be displayed for the respective nexthop

Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
(cherry picked from commit 95c08e082c)
2024-11-11 15:11:12 +00:00
Donatas Abraitis
026f0ddb69
Merge pull request #17397 from FRRouting/mergify/bp/stable/10.2/pr-17362
bgpd: Fix for match source-protocol in route-map for redistribute cmd (backport #17362)
2024-11-10 19:13:14 +02:00
Rajasekar Raja
031d427101 bgpd: Fix for match source-protocol in route-map for redistribute cmd
A redistribute cmd can have a route-map attached to it and adding the
match source-protocol to that route-map means BGP to filter which
protocol routes to accept among the bunch of routes zebra is sending.

Fixing this since this wasnt implemented earlier.

Ticket :#4119692

Signed-off-by: Donald Sharp <sharpd@nvidia.com>

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
(cherry picked from commit 68358c0f92)
2024-11-09 20:02:57 +00:00
Donald Sharp
6afff0c17f
Merge pull request #17387 from FRRouting/mergify/bp/dev/10.2/pr-17341
bgpd:support tcp-mss for neighbor group (backport #17341)
2024-11-08 11:14:03 -05:00
hanyu.zly
0c1564d1d9 bgpd:support tcp-mss for neighbor group
Signed-off-by: hanyu.zly <hanyu.zly@alibaba-inc.com>
(cherry picked from commit 9fa56a03c7)
2024-11-08 07:12:55 +00:00
Donald Sharp
d0ccf0c9fd
Merge pull request #17378 from FRRouting/mergify/bp/dev/10.2/pr-17376
bgpd: Clear stale routes with multiple paths (backport #17376)
2024-11-07 14:12:32 -05:00
Donatas Abraitis
0b1bb84242 tests: Check if stale routes with addpath are marked with LLGR community
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 2e5e3b4bd0)
2024-11-07 16:07:12 +00:00
Donatas Abraitis
86532b3dc2 tests: Check if routes with addpath are cleared if they are stale
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 444bdc4cc0)
2024-11-07 16:07:12 +00:00
Donatas Abraitis
89801c2905 bgpd: Set LLGR stale routes for all the paths including addpath
Without this patch we set only the first path for the route (if multiple exist)
as LLGR stale and stop doing that for the rest of the paths, which is wrong.

Fixes: 1479ed2fb3 ("bgpd: Implement LLGR helper mode")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 895d586a5f)
2024-11-07 16:07:12 +00:00
Donatas Abraitis
f1454d95aa bgpd: Clear all paths including addpath once GR expires
We iterated over all bgp_path_info's, but once we remove the path, we didn't
check for other paths under the same bgp_dest.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 7de464b00f)
2024-11-07 16:07:12 +00:00
Donald Sharp
f640f0714c
Merge pull request #17345 from FRRouting/mergify/bp/dev/10.2/pr-17115
nhrpd: fix passphrase handling, add topotest for resolution request (backport #17115)
2024-11-05 14:28:10 -05:00
Donald Sharp
0533efc5e4
Merge pull request #17357 from FRRouting/mergify/bp/dev/10.2/pr-17326
zebra: fix missing kernel routes (backport #17326)
2024-11-05 14:27:53 -05:00
Donald Sharp
4f823efd63
Merge pull request #17352 from FRRouting/mergify/bp/dev/10.2/pr-17319
ospfd: Use router_id what Zebra has if we remove a static router_id (backport #17319)
2024-11-05 14:26:20 -05:00
Jafar Al-Gharaibeh
530b71b0ac
Merge pull request #17347 from FRRouting/mergify/bp/dev/10.2/pr-17305
bgpd: Treat numbered community-list only if it's in a range 1-500 (backport #17305)
2024-11-05 12:14:02 -06:00
anlan_cs
ac1bd83312 test: add test case for kernel blackhole routes
The test verifies that a kernel blackhole route is not affected by
interface's link change.

Signed-off-by: anlan_cs <anlan_cs@126.com>
(cherry picked from commit 0073a870d1)
2024-11-05 15:22:24 +00:00
anlan_cs
3cb4dcda5c zebra: fix missing kernel routes
The `rib_update_handle_kernel_route_down_possibility()` didn't consider
the kernel routes ( blackhole )  without interface.  When some other
interfaces are down, these kernel routes will be wrongly removed.

Signed-off-by: anlan_cs <anlan_cs@126.com>
(cherry picked from commit 44a82da405)
2024-11-05 15:22:23 +00:00
Donatas Abraitis
efb2f7c080 ospfd: Use router_id what Zebra has if we remove a static router_id
If we set router-id, e.g. `router-id x.x.x.x`, then we have:

```
pc.donatas.net# show ip ospf | include Router ID
 OSPF Routing Process, Router ID: x.x.x.x
```

But once we remove it (`no router-id x.x.x.x`), the old router-id remains.

This is kinda OK, but to be consistent with OSPFv3 we should use what Zebra
already has, instead of retaining the old one.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 1073e0f9b3)
2024-11-05 15:20:52 +00:00
Donatas Abraitis
4e65bbc825 ospfd: Add a hidden command for old no router-id
A new command is `ospf router-id ...`, but the old one is also valid. Just a no
form was missed.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 80bfe6784f)
2024-11-05 15:20:52 +00:00
Donatas Abraitis
8d1ade44be bgpd: Treat numbered community-list only if it's in a range 1-500
Before this patch, if we set something like:

```
bgp extcommunity-list expanded 1234 permit admin
```

In running config we have:

```
bgp extcommunity-list 1234 seq 5 permit admin
```

That leads to incorrect rendering, even more the line can't be deleted.

With this fix we treat numbered community-list only if it's inside the range
1-500, otherwise it's a non-numbered clist.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 4c1ee29116)
2024-11-05 15:17:25 +00:00
Joshua Muthii
a5c5a2fd24 nhrpd: Modify NHRP authentication feature logging
Modified nhrp_connection_authorized(). Initially, when writing debug
information about incoming NHRP packets with authentication enabled,
the nhrp_connection_authorized() function would print the
passphrase of the incoming packet as if it were a null terminated
string. This meant that if the passphrase on the incoming packet
had non ASCII-complient bytes in it, it would attempt to print those
bytes anyway. There was also no check that the size of the passphrase in
the incoming packet matched the size of the passphrase on the interface.
The changes in this commit log the passphrase on the incoming packet as
well as the passphrase on interface in HEX to avoid issues with ASCII.
It also performs a check that accounts for the sizes of the two different
passphrases

Moved CISCO_PASS_LENGTH_LEN from nhrp_vty.c to nhrp_protocol.h
for easier access  to the macro in other files

Signed-off-by: Joshua Muthii <jmuthii@labn.net>
(cherry picked from commit 5718ee37c7)
2024-11-05 15:11:07 +00:00
Joshua Muthii
e127b7f464 nhrpd: Add topotest for retrying resolution request
Modified nhrp_topo topotest to test for newly added resolution
request retry feature. Changes to the topotest include adding a spoke to the
existing nhrp_topo topotest so that a topology with two spokes and hub
can be used to create shortcuts and test the sending/resending of
resolution requests and responses between spoke and hub. The resolution
request retry feature was tested by blocking incoming resolution requests on a
receiving nodes to stop the creation of a successful shortcut - which
then triggered the sending spoke to retry sending resolution requests

Signed-off-by: Joshua Muthii <jmuthii@labn.net>
(cherry picked from commit d599aa1da6)
2024-11-05 15:11:07 +00:00
Jafar Al-Gharaibeh
02f4fef5ff
Merge pull request #17325 from FRRouting/mergify/bp/dev/10.2/pr-17317
tests: Add an ability to specify daemon params with unified config (backport #17317)
2024-11-01 09:03:27 -05:00