]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 months agobgpd: use igpmetric in bgp_aigp_metric_total() 17833/head
Enke Chen [Thu, 9 Jan 2025 20:02:02 +0000 (12:02 -0800)]
bgpd: use igpmetric in bgp_aigp_metric_total()

Use igpmetric from bgp_path_info in bgp_igp_metric_total() to be
consistent with all other cases, e.g., as in bgp_path_info_cmp().

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
(cherry picked from commit b89e66a3bcd5644278f34ec5899b071066e102a1)

3 months agoMerge pull request #17828 from FRRouting/mergify/bp/stable/10.2/pr-17805
Jafar Al-Gharaibeh [Fri, 10 Jan 2025 04:00:58 +0000 (22:00 -0600)]
Merge pull request #17828 from FRRouting/mergify/bp/stable/10.2/pr-17805

2 test fixes (backport #17805)

3 months agoMerge pull request #17827 from FRRouting/mergify/bp/stable/10.2/pr-17809
Jafar Al-Gharaibeh [Fri, 10 Jan 2025 04:00:31 +0000 (22:00 -0600)]
Merge pull request #17827 from FRRouting/mergify/bp/stable/10.2/pr-17809

zebra: Fix leaked nhe (backport #17809)

3 months agoMerge pull request #17815 from FRRouting/mergify/bp/stable/10.2/pr-17807
Jafar Al-Gharaibeh [Thu, 9 Jan 2025 23:30:17 +0000 (17:30 -0600)]
Merge pull request #17815 from FRRouting/mergify/bp/stable/10.2/pr-17807

bgpd: fix crash in displaying json orf prefix-list (backport #17807)

3 months agotests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time 17828/head
Donald Sharp [Wed, 8 Jan 2025 14:42:49 +0000 (09:42 -0500)]
tests: bgp_srv6l3vpn_to_bgp_vrf3 needs more time

The test starts with checking for rib insertion
of routes that may take some time after system
startup to come up.  Under heavy load this may
cause this test to just fail.  Give it more time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 414bc26bc0537945679b499625eb81f173f52395)

3 months agotests: bgp_srv6_sid_reachability should give more time
Donald Sharp [Wed, 8 Jan 2025 14:41:21 +0000 (09:41 -0500)]
tests: bgp_srv6_sid_reachability should give more time

The test starts right in on check_pings with a 10 second
time out.  Any type of delay on startup is going to cause
problems.  Give the first check_ping significant time
for the test to be fully brought up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit b46d3a1a4224564f05a51a73b5932c33ddec0bad)

3 months agozebra: Fix leaked nhe 17827/head
Donald Sharp [Thu, 9 Jan 2025 17:34:50 +0000 (12:34 -0500)]
zebra: Fix leaked nhe

During route processing in zebra, Zebra will create a nexthop
group that matches the nexthops passed down from the routing
protocol.  Then Zebra will look to see if it can re-use a
nhe from a previous version of the route entry( say a interface
goes down ).  If Zebra decides to re-use an nhe it was just dropping
the route entry created.  Which led to nexthop group's that had
a refcount of 0 and in some cases these nexthop groups were installed
into the kernel.

Add a bit of code to see if the returned entry is not being used
and it has no reference count and if so, properly dispose of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 97fa24e70b35bdfb99b9efc163dbcb5c09242527)

3 months agobgpd: fix crash in displaying json orf prefix-list 17815/head
Louis Scalbert [Thu, 9 Jan 2025 17:28:53 +0000 (18:28 +0100)]
bgpd: fix crash in displaying json orf prefix-list

bgpd crashes when there is several entries in the prefix-list. No
backtrace is provided because the issue was catched from a code review.

Fixes: 856ca177c4 ("Added json formating support to show-...-neighbors-... bgp commands.")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 8ccf60921b85893d301186a0f8156fb702da379f)

3 months agobgpd: fix bgp orf prefix-list json prefix
Louis Scalbert [Thu, 9 Jan 2025 17:24:39 +0000 (18:24 +0100)]
bgpd: fix bgp orf prefix-list json prefix

0x<address>FX was displayed instead of the prefix.

Fixes: b219dda129 ("lib: Convert usage of strings to %pFX and %pRN")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit b7e843d7e8afe57d3815dbb44e30307654e73711)

3 months agoMerge pull request #17788 from FRRouting/mergify/bp/stable/10.2/pr-17725
Donald Sharp [Tue, 7 Jan 2025 18:06:48 +0000 (13:06 -0500)]
Merge pull request #17788 from FRRouting/mergify/bp/stable/10.2/pr-17725

isisd: Allow full `no` form for `domain-password` and `area-password` (backport #17725)

3 months agoisisd: Allow full `no` form for `domain-password` and `area-password` 17788/head
Donatas Abraitis [Thu, 26 Dec 2024 15:33:03 +0000 (17:33 +0200)]
isisd: Allow full `no` form for `domain-password` and `area-password`

Before:

```
LR1.wue3(config)# router isis VyOS
LR1.wue3(config-router)# no  area-password clear
% Unknown command: no  area-password clear
LR1.wue3(config-router)# no  area-password clear foo
% Unknown command: no  area-password clear foo
LR1.wue3(config-router)#
```

Closes https://github.com/FRRouting/frr/issues/17722

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit a696547d6c78d4140649f96d6bef9a335fe5dfa5)

3 months agoMerge pull request #17784 from FRRouting/mergify/bp/stable/10.2/pr-17780
Russ White [Tue, 7 Jan 2025 13:56:11 +0000 (08:56 -0500)]
Merge pull request #17784 from FRRouting/mergify/bp/stable/10.2/pr-17780

bgpd: fix a bug in peer_allowas_in_set() (backport #17780)

3 months agobgpd: fix a bug in peer_allowas_in_set() 17784/head
Enke Chen [Tue, 7 Jan 2025 05:01:14 +0000 (21:01 -0800)]
bgpd: fix a bug in peer_allowas_in_set()

Fix a bug in peer_allowas_in_set() so that the config takes effect
for peer-group members.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
(cherry picked from commit bcd10177940223d86cbcfbe1818b2a0b29e0552b)

3 months agoMerge pull request #17743 from opensourcerouting/fix/backport_5b8b821f2f1b98280af05ad...
Jafar Al-Gharaibeh [Sun, 5 Jan 2025 22:06:33 +0000 (16:06 -0600)]
Merge pull request #17743 from opensourcerouting/fix/backport_5b8b821f2f1b98280af05ade9d2770e5e6b3c042

tools: Add missing formats keyword to segment-routing in frr-reload (backport)

3 months agoMerge pull request #17754 from opensourcerouting/fix/backport_29eafd32c58c3b6e3ecb6f7...
Jafar Al-Gharaibeh [Sun, 5 Jan 2025 22:06:17 +0000 (16:06 -0600)]
Merge pull request #17754 from opensourcerouting/fix/backport_29eafd32c58c3b6e3ecb6f715aef74a17f22382a

bgpd: Do not try to uninstall BFD session if the peer is not established (backport)

3 months agoMerge pull request #17763 from FRRouting/mergify/bp/stable/10.2/pr-17750
Donatas Abraitis [Sun, 5 Jan 2025 12:18:14 +0000 (14:18 +0200)]
Merge pull request #17763 from FRRouting/mergify/bp/stable/10.2/pr-17750

tools: Add missing rpki keyword to vrf in frr-reload (backport #17750)

3 months agotools: Add missing rpki keyword to vrf in frr-reload 17763/head
Jonathan Voss [Fri, 3 Jan 2025 03:19:30 +0000 (03:19 +0000)]
tools: Add missing rpki keyword to vrf in frr-reload

When reloading the following configuration:
```
vrf red
 rpki
  rpki cache tcp 172.65.0.2 8282 preference 1
 exit
exit-vrf
```
frr-reload.py does not properly enter the `rpki` context
within a `vrf`. Because of this, it fails to apply RPKI
configurations.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
(cherry picked from commit 975ee8ed6eb22f68538f3446b29ca34d65bec72f)

3 months agoMerge pull request #17755 from FRRouting/mergify/bp/stable/10.2/pr-17732
Mark Stapp [Fri, 3 Jan 2025 15:10:35 +0000 (10:10 -0500)]
Merge pull request #17755 from FRRouting/mergify/bp/stable/10.2/pr-17732

isisd: Show correct level information for `show isis interface detail json` (backport #17732)

3 months agoisisd: Show correct level information for `show isis interface detail json` 17755/head
Donatas Abraitis [Mon, 30 Dec 2024 08:31:44 +0000 (10:31 +0200)]
isisd: Show correct level information for `show isis interface detail json`

Having this configuration:

```
!
interface r1-eth0
 ip address 10.0.0.1/30
 ip router isis 1
 isis priority 44 level-1
 isis priority 88 level-2
 isis csnp-interval 90 level-1
 isis csnp-interval 99 level-2
 isis psnp-interval 70 level-1
 isis psnp-interval 50 level-2
 isis hello-interval level-1 120
 isis hello-interval level-2 150

!
interface r1-eth1
 ip address 10.0.0.10/30
 ip router isis 1
!
interface lo
 ip address 192.0.2.1/32
 ip router isis 1
 isis passive
!
router isis 1
net 49.0000.0000.0000.0001.00
 metric-style wide
```

Produces:

```
{
 "areas":[
   {
     "area":"1",
     "circuits":[
       {
         "circuit":2,
         "interface":{
           "name":"r1-eth0",
           "state":"Up",
           "is-passive":"active",
           "circuit-id":"0x2",
           "type":"lan",
           "level":"L1L2",
           "snpa":"6e28.9c92.da5e",
           "levels":[
             {
               "level":"L1",
               "metric":10,
               "active-neighbors":1,
               "hello-interval":120,
               "holddown":{
                 "count":10,
                 "pad":"yes"
               },
               "cnsp-interval":90,
               "psnp-interval":70,
               "lan":{
                 "priority":44,
                 "is-dis":"no"
               }
             },
             {
               "level":"L2",
               "metric":10,
               "active-neighbors":1,
               "hello-interval":120, <<<<<<<<<<<<<<<<<<
               "holddown":{
                 "count":10,
                 "pad":"yes"
               },
               "cnsp-interval":90, <<<<<<<<<<<<<<<<<<
               "psnp-interval":70, <<<<<<<<<<<<<<<<<<
               "lan":{
                 "priority":44, <<<<<<<<<<<<<<<<<<
                 "is-dis":"no"
               }
             }
           ],
...
```

Fixes: 9fee4d4c6038ef6b14e9f509d6b04d189660c4cd ("isisd: Add json to show isis interface command.")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 360a0d6f4ca68fda0eb5d64a8633018a3b5a4a1d)

3 months agobgpd: Do not try to uninstall BFD session if the peer is not established 17754/head
Donatas Abraitis [Mon, 11 Nov 2024 14:49:22 +0000 (16:49 +0200)]
bgpd: Do not try to uninstall BFD session if the peer is not established

Having something like:

```
 neighbor 192.168.1.222 ebgp-multihop 32
 neighbor 192.168.1.222 update-source 192.168.1.5
 neighbor 192.168.1.222 bfd
```

Won't work and the result is (empty):

```
$ show bfd peers
BFD Peers:
```

bgp_stop() is called in BGP FSM multiple times (even at startup) that
causes intermediate session interruption when update-source/ebgp-multihop
is triggered.

With this fix, the ordering does not matter and the BFD session's parameters
are updated correctly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 months agoMerge pull request #17740 from FRRouting/mergify/bp/stable/10.2/pr-17731
Jafar Al-Gharaibeh [Wed, 1 Jan 2025 19:21:03 +0000 (13:21 -0600)]
Merge pull request #17740 from FRRouting/mergify/bp/stable/10.2/pr-17731

zebra: Fix resetting valid flags for NHG dependents (backport #17731)

3 months agotools: Add missing formats keyword to segment-routing in frr-reload 17743/head
Jonathan Voss [Tue, 24 Dec 2024 16:32:13 +0000 (16:32 +0000)]
tools: Add missing formats keyword to segment-routing in frr-reload

When reloading the following configuration:
```
segment-routing
 srv6
  formats
   format usid-f3216
     wide-local-id-block explicit start 100
   exit
   !
   format uncompressed-f4024
   exit
   !
  exit
  !
 exit
 !
exit
```
frr-reload.py does not properly enter the `formats` context. Because of this,
it fails with an unknown command error when applying new or updating format
configuration.

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
3 months agozebra: Fix resetting valid flags for NHG dependents 17740/head
Donald Sharp [Sun, 29 Dec 2024 06:40:37 +0000 (22:40 -0800)]
zebra: Fix resetting valid flags for NHG dependents

Upon if_down, we don't reset the valid flag for dependents
and unset the INSTALLED flag.

So when its time for the NHG to be deleted (routes dereferenced),
zebra deletes it since refcnt goes to 0, but stale NHG remains in kernel.

Ticket :#4200788

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
(cherry picked from commit 54ec9f38884fb63e045732537c4c1f4a94608987)

4 months agoFRR Release 10.2.1 rc/10.2.1 docker/10.2.1 frr-10.2.1
Donatas Abraitis [Mon, 23 Dec 2024 20:33:44 +0000 (22:33 +0200)]
FRR Release 10.2.1

- bfdd
-   retain remote dplane client socket
- bgpd
-   Fix to pop items off zebra_announce FIFO for few EVPN triggers
-   Check if as_type is not specified when peer is a peer-group member
-   Do not reset peers on suppress-fib toggling
-   Fix bgp core with a possible Intf delete
-   Fix `enforce-first-as` per peer-group removal
-   Fix evpn bestpath calculation when path is not established
-   Fix graceful-restart for peer-groups
-   Fix memory leak when creating BMP connection with a source interface
-   Fix memory leak when reconfiguring a route distinguisher
-   Fix unconfigure asdot neighbor
-   Fix use single whitespace when displaying flowspec entries
-   Fix version attribute is an int, not a string
-   Import allowed routes with self AS if desired
-   Initialize as_type for peer-group as AS_UNSPECIFIED
-   Use gracefulRestart JSON field
-   Validate both nexthop information (NEXTHOP and NLRI)
-   Validate only affected RPKI prefixes instead of a full RIB
-   When calling bgp_process, prevent infinite loop
- lib
-   Allow setsockopt functions to return size set
-   Fix session re-establishment
-   Take ge/le into consideration when checking the prefix with the prefix-list
-   Use backoff setsockopt option for freebsd
- ospfd
-   OSPF multi-instance default origination fixes
- pimd
-   Fix access-list memory leak in pimd
-   Free igmp proxy joins on interface deletion
-   igmp proxy joins should not be written as part of config
-   Prevent crash of pim when auto-rp's socket is not initialized

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
4 months agoMerge pull request #17712 from opensourcerouting/fix/backport_b6dcf618777bb7a11176617...
Jafar Al-Gharaibeh [Mon, 23 Dec 2024 04:48:23 +0000 (22:48 -0600)]
Merge pull request #17712 from opensourcerouting/fix/backport_b6dcf618777bb7a11176617d647e16ab64f49b7b_10.2

bgpd: Fix `enforce-first-as` per peer-group removal (backport)

4 months agobgpd: Fix `enforce-first-as` per peer-group removal 17712/head
Donatas Abraitis [Sat, 21 Dec 2024 15:03:14 +0000 (17:03 +0200)]
bgpd: Fix `enforce-first-as` per peer-group removal

If we do `no neighbor PG enforce-first-as`, it wasn't working because the flag
was inherited incorrectly for the members of the peer-group.

Fixes: 322462920e2a2c8b73191c6eb5157d64cf4a593e ("bgpd: Enable enforce-first-as by default")
Closes: https://github.com/FRRouting/frr/issues/17702
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
4 months agoMerge pull request #17696 from FRRouting/mergify/bp/stable/10.2/pr-17586
Donatas Abraitis [Fri, 20 Dec 2024 20:47:26 +0000 (22:47 +0200)]
Merge pull request #17696 from FRRouting/mergify/bp/stable/10.2/pr-17586

bgpd: Validate only affected RPKI prefixes instead of a full RIB (backport #17586)

4 months agoMerge pull request #17689 from FRRouting/mergify/bp/stable/10.2/pr-17669
Jafar Al-Gharaibeh [Fri, 20 Dec 2024 19:57:59 +0000 (13:57 -0600)]
Merge pull request #17689 from FRRouting/mergify/bp/stable/10.2/pr-17669

bgpd: fix memory leak when reconfiguring a route distinguisher (backport #17669)

4 months agobgpd: Validate only affected RPKI prefixes instead of a full RIB 17696/head
Donatas Abraitis [Wed, 4 Dec 2024 21:38:34 +0000 (23:38 +0200)]
bgpd: Validate only affected RPKI prefixes instead of a full RIB

Before this fix, if rpki_sync_socket_rtr socket returns EAGAIN, then ALL routes
in the RIB are revalidated which takes lots of CPU and some unnecessary traffic,
e.g. if using BMP servers. With a full feed it would waste 50-80Mbps.

Instead we should try to drain an existing pipe (another end), and revalidate
only affected prefixes.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit b0800bfdf04b4fcf48504737ebfe4ba7f05268d3)

4 months agobgpd: fix memory leak when reconfiguring a route distinguisher 17689/head
Philippe Guibert [Wed, 18 Dec 2024 15:53:48 +0000 (16:53 +0100)]
bgpd: fix memory leak when reconfiguring a route distinguisher

A memory leak happens when reconfiguring an already configured route
distinguisher on an L3VPN BGP instance. Fix this by freeing the previous
route distinguisher.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 0dd96287dda22b79ef6d7424f4e1a8dc92959f92)

4 months agoMerge pull request #17678 from FRRouting/mergify/bp/stable/10.2/pr-17675
Donatas Abraitis [Fri, 20 Dec 2024 09:25:26 +0000 (11:25 +0200)]
Merge pull request #17678 from FRRouting/mergify/bp/stable/10.2/pr-17675

bgpd: Fix memory leak when creating BMP connection with a source interface (backport #17675)

4 months agobgpd: Fix memory leak when creating BMP connection with a source interface 17678/head
Donatas Abraitis [Thu, 19 Dec 2024 08:56:52 +0000 (10:56 +0200)]
bgpd: Fix memory leak when creating BMP connection with a source interface

Testing done with:

```
for x in $(seq 1 100000); do vtysh -c 'conf' -c 'router bgp' -c 'bmp targets test' -c 'bmp connect localhost port 123 min-retry 100 max-retry 100 source-interface lo'; done
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 7d19cb59cf5b129f61f3c568899343b3f031f9b4)

4 months agoMerge pull request #17656 from FRRouting/mergify/bp/stable/10.2/pr-17615
Donatas Abraitis [Tue, 17 Dec 2024 20:50:19 +0000 (22:50 +0200)]
Merge pull request #17656 from FRRouting/mergify/bp/stable/10.2/pr-17615

lib: Take ge/le into consideration when checking the prefix with the prefix-list (backport #17615)

4 months agoMerge pull request #17662 from FRRouting/mergify/bp/stable/10.2/pr-17613
Donatas Abraitis [Tue, 17 Dec 2024 20:49:28 +0000 (22:49 +0200)]
Merge pull request #17662 from FRRouting/mergify/bp/stable/10.2/pr-17613

bgpd: Fix evpn bestpath calculation when path is not established (backport #17613)

4 months agobgpd: Fix evpn bestpath calculation when path is not established 17662/head
Donald Sharp [Thu, 5 Dec 2024 18:12:00 +0000 (13:12 -0500)]
bgpd: Fix evpn bestpath calculation when path is not established

If you have a bestpath list that looks something like this:

<local evpn mac route>
<learned from peer out swp60>
<learned from peer out swp57>

And a network event happens that causes the peer out swp60
to not be in an established state, yet we still have the
path_info for the destination for swp60, bestpath
will currently end up with this order:

<learned from peer out swp60>
<local evpn mac route>
<learned from peer out swp57>

This causes the local evpn mac route to be deleted in zebra( Wrong! ).

This is happening because swp60 is skipped in bestpath calculation and
not considered to be a path yet it stays at the front of the list.

Modify bestpath calculation such that when pulling the unsorted_list
together to pull path info's into that list when they are also
not in a established state.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 9f88cb56dc0fe7a4ce864f672c6ca420fcd420c2)

4 months agolib: Take ge/le into consideration when checking the prefix with the prefix-list 17656/head
Donatas Abraitis [Tue, 10 Dec 2024 14:28:26 +0000 (16:28 +0200)]
lib: Take ge/le into consideration when checking the prefix with the prefix-list

Without the fix:

```
show ip prefix-list test_1 10.20.30.96/27 first-match
 <no result>

show ip prefix-list test_2 192.168.1.2/32 first-match
 <no result>
```

With the fix:

```
ip prefix-list test_1 seq 10 permit 10.20.30.64/26 le 27
!
end
donatas# show ip prefix-list test_1 10.20.30.96/27
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 1, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.64/27
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 2, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.64/28
donatas# show ip prefix-list test_1 10.20.30.126/26
   seq 10 permit 10.20.30.64/26 le 27 (hit count: 3, refcount: 0)
donatas# show ip prefix-list test_1 10.20.30.126/30
donatas#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit dd4c2acc2e871283256f6cea16ede6d2d7f72dfe)

4 months agoMerge pull request #17643 from FRRouting/mergify/bp/stable/10.2/pr-17641
Donatas Abraitis [Fri, 13 Dec 2024 07:09:54 +0000 (09:09 +0200)]
Merge pull request #17643 from FRRouting/mergify/bp/stable/10.2/pr-17641

bgpd: When calling bgp_process, prevent infinite loop (backport #17641)

4 months agobgpd: When calling bgp_process, prevent infinite loop 17643/head
Donald Sharp [Thu, 12 Dec 2024 20:08:35 +0000 (15:08 -0500)]
bgpd: When calling bgp_process, prevent infinite loop

If we have this construct:

for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) {
     ...
     bgp_process();
}

This can induce an infinite loop.  This happens because bgp_process
will move the unsorted items to the top of the list for handling,
as such it is necessary to hold the next pointer to the side
to actually look at each possible bgp_path_info.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 40c31bdf4092d45c23fc0e1eed9467015d224d2d)

4 months agoMerge pull request #17621 from opensourcerouting/fix/backport_ed701fe6272d1c5583b75bb...
Donald Sharp [Wed, 11 Dec 2024 12:21:39 +0000 (07:21 -0500)]
Merge pull request #17621 from opensourcerouting/fix/backport_ed701fe6272d1c5583b75bb5a84be2005c1b30af_10.2

bgpd: Import allowed routes with self AS if desired (backport)

4 months agoMerge pull request #17630 from opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a...
Donald Sharp [Wed, 11 Dec 2024 12:20:59 +0000 (07:20 -0500)]
Merge pull request #17630 from opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a8b08a35fe9a172c4b_10.2

bgpd: Fix bgp core with a possible Intf delete (backport)

4 months agobgpd: Fix bgp core with a possible Intf delete 17630/head
Rajasekar Raja [Tue, 10 Dec 2024 21:45:02 +0000 (13:45 -0800)]
bgpd: Fix bgp core with a possible Intf delete

Although trigger unknown, based on the backtrace in one of the internal
testing, we do see some delete in the Intf where we can have the peer
ifp pointer null and we try to dereference it while trying to install
the route leading to a crash

Skip updating the ifindex in such cases and since the nexthop is not
properly updated, BGP skips sending it to zebra.

BackTrace:
0  0x00007faef05e7ebc in ?? () from /lib/x86_64-linux-gnu/libc.so.6
1  0x00007faef0598fb2 in raise () from /lib/x86_64-linux-gnu/libc.so.6
2  0x00007faef09900dc in core_handler (signo=11, siginfo=0x7ffdde8cb4b0, context=<optimized out>) at lib/sigevent.c:274
3  <signal handler called>
4  0x00005560aad4b7d8 in update_ipv6nh_for_route_install (api_nh=0x7ffdde8cbe94, is_evpn=false, best_pi=0x5560b21187d0, pi=0x5560b21187d0, ifindex=0, nexthop=0x5560b03cb0dc,
   nh_bgp=0x5560ace04df0, nh_othervrf=0) at bgpd/bgp_zebra.c:1273
5  bgp_zebra_announce_actual (dest=dest@entry=0x5560afcfa950, info=0x5560b21187d0, bgp=0x5560ace04df0) at bgpd/bgp_zebra.c:1521
6  0x00005560aad4bc85 in bgp_handle_route_announcements_to_zebra (e=<optimized out>) at bgpd/bgp_zebra.c:1896
7  0x00007faef09a1c0d in thread_call (thread=thread@entry=0x7ffdde8d7580) at lib/thread.c:2008
8  0x00007faef095a598 in frr_run (master=0x5560ac7e5190) at lib/libfrr.c:1223
9  0x00005560aac65db6 in main (argc=<optimized out>, argv=<optimized out>) at bgpd/bgp_main.c:557

(gdb) f 4
4  0x00005560aad4b7d8 in update_ipv6nh_for_route_install (api_nh=0x7ffdde8cbe94, is_evpn=false, best_pi=0x5560b21187d0, pi=0x5560b21187d0, ifindex=0, nexthop=0x5560b03cb0dc,
    nh_bgp=0x5560ace04df0, nh_othervrf=0) at bgpd/bgp_zebra.c:1273
1273 in bgpd/bgp_zebra.c
(gdb) p pi->peer->ifp
$26 = (struct interface *) 0x0

Ticket :#4203904

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
4 months agobgpd: Import allowed routes with self AS if desired 17621/head
Donatas Abraitis [Sun, 8 Dec 2024 19:46:59 +0000 (21:46 +0200)]
bgpd: Import allowed routes with self AS if desired

Previously we couldn't install VPN routes with self AS in the path because
we never checked if we have allowas-in enabled, or not.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 222ba5f39048953f384ab3aa207af753dfa92e67)

4 months agoMerge pull request #17604 from FRRouting/mergify/bp/stable/10.2/pr-17603
Jafar Al-Gharaibeh [Fri, 6 Dec 2024 17:45:55 +0000 (11:45 -0600)]
Merge pull request #17604 from FRRouting/mergify/bp/stable/10.2/pr-17603

bgpd: Check if as_type is not specified when peer is a peer-group member (backport #17603)

4 months agobgpd: Check if as_type is not specified when peer is a peer-group member 17604/head
Donatas Abraitis [Fri, 6 Dec 2024 06:25:09 +0000 (08:25 +0200)]
bgpd: Check if as_type is not specified when peer is a peer-group member

Fixes this sequences:

```
neighbor pg4 peer-group
neighbor 127.0.0.4 peer-group pg4
neighbor 127.0.0.4 remote-as 65004

neighbor pg5 peer-group
neighbor 127.0.0.5 peer-group pg5
neighbor 127.0.0.5 remote-as internal
```

Fixes: 0dfe256 ("bgpd: Implement neighbor X remote-as auto")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 2797506a5ea6d9de8fd7ee217879c15ee9c5acd6)

4 months agoMerge pull request #17601 from FRRouting/mergify/bp/stable/10.2/pr-17570
Jafar Al-Gharaibeh [Thu, 5 Dec 2024 18:26:27 +0000 (12:26 -0600)]
Merge pull request #17601 from FRRouting/mergify/bp/stable/10.2/pr-17570

pimd: free igmp proxy joins on interface deletion (backport #17570)

4 months agoMerge pull request #17590 from FRRouting/mergify/bp/stable/10.2/pr-17582
Jafar Al-Gharaibeh [Thu, 5 Dec 2024 15:25:16 +0000 (09:25 -0600)]
Merge pull request #17590 from FRRouting/mergify/bp/stable/10.2/pr-17582

bgpd: fix unconfigure asdot neighbor (backport #17582)

4 months agopimd: free igmp proxy joins on interface deletion 17601/head
Barry A. Trent [Tue, 3 Dec 2024 22:43:47 +0000 (14:43 -0800)]
pimd: free igmp proxy joins on interface deletion

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
(cherry picked from commit 693a37ab04792c74df4481bcf9e7aef55f0bbe06)

4 months agobgpd: fix unconfigure asdot neighbor 17590/head
Philippe Guibert [Wed, 4 Dec 2024 20:25:33 +0000 (21:25 +0100)]
bgpd: fix unconfigure asdot neighbor

The below command is not successfull on an existing as dot peer

> no neighbor 10.0.0.2 remote-as 1.1
> % Create the peer-group or interface first

Handle the case where the remote-as argument can be an ASNUM.

Fixes: 8079a4138d61 ("lib, bgp: add initial support for asdot format")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 12a9ca4de6c781b061cccdf3e793346e23558901)

4 months agoMerge pull request #17584 from Jafaral/fix-autorp-crash
Donatas Abraitis [Thu, 5 Dec 2024 07:12:59 +0000 (09:12 +0200)]
Merge pull request #17584 from Jafaral/fix-autorp-crash

pimd: Prevent crash of pim when auto-rp's socket is not initialized (backport #17578)

4 months agopimd: Prevent crash of pim when auto-rp's socket is not initialized 17584/head
Jafar Al-Gharaibeh [Wed, 4 Dec 2024 20:57:13 +0000 (14:57 -0600)]
pimd: Prevent crash of pim when auto-rp's socket is not initialized

If the socket associated with the auto-rp fails to initialize then
the memory for the auto-rp is just dropped on the floor.  Additionally
any type of attempt at using the feature will just cause pimd to crash,
when the pointer is derefed.  Since it is derefed all over the place
without checking.

Clearly if you cannot bind/use the socket let's allow continuation.

Fixes: #17540
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 months agoMerge pull request #17576 from FRRouting/mergify/bp/stable/10.2/pr-17571
Donatas Abraitis [Wed, 4 Dec 2024 15:48:15 +0000 (17:48 +0200)]
Merge pull request #17576 from FRRouting/mergify/bp/stable/10.2/pr-17571

Fix bsd sockopt problem (backport #17571)

4 months agoMerge pull request #17577 from FRRouting/mergify/bp/stable/10.2/pr-17569
Jafar Al-Gharaibeh [Wed, 4 Dec 2024 15:32:03 +0000 (09:32 -0600)]
Merge pull request #17577 from FRRouting/mergify/bp/stable/10.2/pr-17569

pimd: igmp proxy joins should not be written as part of config (backport #17569)

4 months agopimd: igmp proxy joins should not be written as part of config 17577/head
Barry A. Trent [Tue, 3 Dec 2024 19:17:33 +0000 (11:17 -0800)]
pimd: igmp proxy joins should not be written as part of config

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
(cherry picked from commit d4b8a98019f6a2723089eda88adfa45494a5e8f7)

4 months agolib,vtysh: Use backoff setsockopt option for freebsd 17576/head
Donald Sharp [Tue, 3 Dec 2024 23:49:59 +0000 (18:49 -0500)]
lib,vtysh: Use backoff setsockopt option for freebsd

Commit: 9112fb367b1ae0168b4e7a81f41c2ca621979199

Introduced the idea of setting the socket buffer
send/receive sizes.  BSD's in general have the fun
issue of not allowing nearly as large as a size as
linux.  Since the above commit was developed on linux
and not run on bsd it was never tested.  Modify the
codebase to use the backoff setsockopt that we have
in the code base and use the returned values to allow
us to notice what was set and respond appropriately.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 959dbe27cde21ab212f6566b30865b2da418b4d2)

4 months agolib: Allow setsockopt functions to return size set
Donald Sharp [Tue, 3 Dec 2024 23:38:59 +0000 (18:38 -0500)]
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 d5615fd6f84e643f194be8c3e91343b35585eb9c)

4 months agoMerge pull request #17574 from opensourcerouting/fix/backports_fix_branch
Donald Sharp [Wed, 4 Dec 2024 12:37:00 +0000 (07:37 -0500)]
Merge pull request #17574 from opensourcerouting/fix/backports_fix_branch

Stabilize stable/10.2

4 months agobgpd: Initialize as_type for peer-group as AS_UNSPECIFIED 17574/head
Donatas Abraitis [Sun, 1 Dec 2024 12:32:08 +0000 (14:32 +0200)]
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: 0dfe25697f5299326046fcfb66f2c6beca7c423c ("bgpd: Implement neighbor X remote-as auto")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e57fb3282a6dce0835bb6d0f2a2f83fa54a35df4)

4 months agopimd: Fix access-list memory leak in pimd
Corey Siltala [Tue, 26 Nov 2024 16:04:14 +0000 (10:04 -0600)]
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 d21a993f16dc23df6a1f1a7c81e9f562446437a0)

4 months agolib: Fix session re-establishment
Donald Sharp [Tue, 3 Dec 2024 17:08:12 +0000 (12:08 -0500)]
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>
4 months agoRevert "tests: Add topotest for OSPF multi-instance default origination."
Donatas Abraitis [Wed, 4 Dec 2024 06:54:18 +0000 (08:54 +0200)]
Revert "tests: Add topotest for OSPF multi-instance default origination."

This reverts commit f10d2388693fc6904fb7ad4cf1570dd8eae8c213.

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>
5 months agoMerge pull request #17522 from FRRouting/mergify/bp/stable/10.2/pr-17510
Donatas Abraitis [Thu, 28 Nov 2024 05:53:22 +0000 (07:53 +0200)]
Merge pull request #17522 from FRRouting/mergify/bp/stable/10.2/pr-17510

bgpd: fix use single whitespace when displaying flowspec entries (backport #17510)

5 months agoMerge pull request #17478 from FRRouting/mergify/bp/stable/10.2/pr-17436
Russ White [Tue, 26 Nov 2024 18:56:29 +0000 (13:56 -0500)]
Merge pull request #17478 from FRRouting/mergify/bp/stable/10.2/pr-17436

ospfd: OSPF multi-instance default origination fixes (backport #17436)

5 months agoMerge pull request #17517 from FRRouting/mergify/bp/stable/10.2/pr-17501
Donatas Abraitis [Tue, 26 Nov 2024 18:40:44 +0000 (20:40 +0200)]
Merge pull request #17517 from FRRouting/mergify/bp/stable/10.2/pr-17501

bgpd: Fix Graceful-Restart for peer-groups (backport #17501)

5 months agobgpd: fix use single whitespace when displaying flowspec entries 17522/head
Philippe Guibert [Tue, 26 Nov 2024 13:19:34 +0000 (14:19 +0100)]
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 561debab5430ac85e8e42e839312d213479a767a)

5 months agoMerge pull request #17511 from FRRouting/mergify/bp/stable/10.2/pr-17506
Russ White [Tue, 26 Nov 2024 16:37:44 +0000 (11:37 -0500)]
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)

5 months agotests: Check if GR settings are inherited for peer-groups 17517/head
Donatas Abraitis [Mon, 25 Nov 2024 08:40:28 +0000 (10:40 +0200)]
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 a4bfa8c574e8ea6f1b8c6035b071a35e8d3d3f08)

5 months agobgpd: Use gracefulRestart JSON field
Donatas Abraitis [Mon, 25 Nov 2024 08:42:16 +0000 (10:42 +0200)]
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 ee5893ff598a72e3a9bf4d2f6a9bd43f833defa6)

5 months agobgpd: Fix graceful-restart for peer-groups
Donatas Abraitis [Sun, 24 Nov 2024 19:57:19 +0000 (21:57 +0200)]
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: 15403f521a12b668e87ef8961c78e0ed97c6ff92 ("bgpd: Streamline GR config, act on change immediately")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 0a85b1ba04f6463e300aa6d5e064a5e5d79bec53)

5 months agobgpd: fix version attribute is an int, not a string 17511/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>
(cherry picked from commit c5d7815cccb92c192ca6b752843b8b827a607b53)

5 months agoMerge pull request #17488 from FRRouting/mergify/bp/stable/10.2/pr-17487
Donald Sharp [Fri, 22 Nov 2024 23:33:59 +0000 (18:33 -0500)]
Merge pull request #17488 from FRRouting/mergify/bp/stable/10.2/pr-17487

bgpd: Do not reset peers on suppress-fib toggling (backport #17487)

5 months agobgpd: Do not reset peers on suppress-fib toggling 17488/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>
(cherry picked from commit 7fb4c03f5b1c9cd4e8acb85b4cf953ac85aa0bbf)

5 months agotests: Add topotest for OSPF multi-instance default origination. 17478/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>
(cherry picked from commit 82f434940207c5d2ed0e52f0d27998fb56129064)

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>
(cherry picked from commit 6afd56da969821359ee1fdfbfd33259587f58184)

5 months agoMerge pull request #17470 from FRRouting/mergify/bp/stable/10.2/pr-17464
Jafar Al-Gharaibeh [Thu, 21 Nov 2024 03:53:47 +0000 (21:53 -0600)]
Merge pull request #17470 from FRRouting/mergify/bp/stable/10.2/pr-17464

bfdd: retain remote dplane client socket (backport #17464)

5 months agobfdd: retain remote dplane client socket 17470/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>
(cherry picked from commit f5115307888dc8ca4b6369d1b705686d3c689d23)

5 months agoMerge pull request #17446 from opensourcerouting/fix/backport_65a43b57efd60c4fdf80c93...
Jafar Al-Gharaibeh [Wed, 20 Nov 2024 05:27:54 +0000 (23:27 -0600)]
Merge pull request #17446 from opensourcerouting/fix/backport_65a43b57efd60c4fdf80c935750046ba861ec79f_10.2

bgpd: Validate both nexthop information (NEXTHOP and NLRI) (backport)

5 months agoMerge pull request #17437 from FRRouting/mergify/bp/stable/10.2/pr-17432
Donatas Abraitis [Tue, 19 Nov 2024 21:47:55 +0000 (22:47 +0100)]
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)

5 months agobgpd: Validate both nexthop information (NEXTHOP and NLRI) 17446/head
Donatas Abraitis [Sun, 17 Nov 2024 09:16:05 +0000 (11:16 +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>
(cherry picked from commit a0d2734e879f78fbef5f1815429de331b9940c73)

5 months agobgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers 17437/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>
(cherry picked from commit 898852f2699887bc92e96267cb3fcf221a3df01e)

5 months agoFRR Release 10.2 docker/10.2.0 frr-10.2
Jafar Al-Gharaibeh [Tue, 12 Nov 2024 15:59:48 +0000 (09:59 -0600)]
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>
5 months agodebian, redhat: updating changelog for 10.2 release
Jafar Al-Gharaibeh [Tue, 12 Nov 2024 15:54:02 +0000 (09:54 -0600)]
debian, redhat: updating changelog for 10.2 release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
5 months agoMerge pull request #17411 from FRRouting/mergify/bp/stable/10.2/pr-17409
Russ White [Tue, 12 Nov 2024 15:03:45 +0000 (10:03 -0500)]
Merge pull request #17411 from FRRouting/mergify/bp/stable/10.2/pr-17409

bgpd: fix resolvedPrefix in show nexthop json output (backport #17409)

5 months agobgpd: fix resolvedPrefix in show nexthop json output 17411/head
Krishnasamy R [Mon, 11 Nov 2024 09:59:31 +0000 (01:59 -0800)]
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 95c08e082c063374cbc62dea6529c8f54b0722df)

5 months agoMerge pull request #17397 from FRRouting/mergify/bp/stable/10.2/pr-17362
Donatas Abraitis [Sun, 10 Nov 2024 17:13:14 +0000 (19:13 +0200)]
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)

5 months agobgpd: Fix for match source-protocol in route-map for redistribute cmd 17397/head
Rajasekar Raja [Mon, 21 Oct 2024 17:53:27 +0000 (10:53 -0700)]
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 68358c0f928eafe50c9e73b0cb6a443c03f2a33f)

5 months agoMerge pull request #17387 from FRRouting/mergify/bp/dev/10.2/pr-17341
Donald Sharp [Fri, 8 Nov 2024 16:14:03 +0000 (11:14 -0500)]
Merge pull request #17387 from FRRouting/mergify/bp/dev/10.2/pr-17341

bgpd:support tcp-mss for neighbor group (backport #17341)

5 months agobgpd:support tcp-mss for neighbor group 17387/head
hanyu.zly [Mon, 4 Nov 2024 08:21:09 +0000 (16:21 +0800)]
bgpd:support tcp-mss for neighbor group

Signed-off-by: hanyu.zly <hanyu.zly@alibaba-inc.com>
(cherry picked from commit 9fa56a03c7568cb9b74f31386baef5252c5b66ce)

5 months agoMerge pull request #17378 from FRRouting/mergify/bp/dev/10.2/pr-17376
Donald Sharp [Thu, 7 Nov 2024 19:12:32 +0000 (14:12 -0500)]
Merge pull request #17378 from FRRouting/mergify/bp/dev/10.2/pr-17376

bgpd: Clear stale routes with multiple paths (backport #17376)

5 months agotests: Check if stale routes with addpath are marked with LLGR community 17378/head
Donatas Abraitis [Thu, 7 Nov 2024 12:01:39 +0000 (14:01 +0200)]
tests: Check if stale routes with addpath are marked with LLGR community

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 2e5e3b4bd097dc5b45dee476d844bde398ebee00)

5 months agotests: Check if routes with addpath are cleared if they are stale
Donatas Abraitis [Thu, 7 Nov 2024 11:17:12 +0000 (13:17 +0200)]
tests: Check if routes with addpath are cleared if they are stale

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 444bdc4cc04908fbda08114fd2f845b3be088e01)

5 months agobgpd: Set LLGR stale routes for all the paths including addpath
Donatas Abraitis [Thu, 7 Nov 2024 11:08:35 +0000 (13:08 +0200)]
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: 1479ed2fb35f4a5ae1017201a7ee37ba2727163a ("bgpd: Implement LLGR helper mode")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 895d586a5f4a15be0475296d7a5a374927d17dad)

5 months agobgpd: Clear all paths including addpath once GR expires
Donatas Abraitis [Thu, 7 Nov 2024 11:04:54 +0000 (13:04 +0200)]
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 7de464b00f1a188ec919abce56de6215f05fc4c0)

5 months agoMerge pull request #17345 from FRRouting/mergify/bp/dev/10.2/pr-17115
Donald Sharp [Tue, 5 Nov 2024 19:28:10 +0000 (14:28 -0500)]
Merge pull request #17345 from FRRouting/mergify/bp/dev/10.2/pr-17115

nhrpd: fix passphrase handling, add topotest for resolution request (backport #17115)

5 months agoMerge pull request #17357 from FRRouting/mergify/bp/dev/10.2/pr-17326
Donald Sharp [Tue, 5 Nov 2024 19:27:53 +0000 (14:27 -0500)]
Merge pull request #17357 from FRRouting/mergify/bp/dev/10.2/pr-17326

zebra: fix missing kernel routes (backport #17326)

5 months agoMerge pull request #17352 from FRRouting/mergify/bp/dev/10.2/pr-17319
Donald Sharp [Tue, 5 Nov 2024 19:26:20 +0000 (14:26 -0500)]
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)

5 months agoMerge pull request #17347 from FRRouting/mergify/bp/dev/10.2/pr-17305
Jafar Al-Gharaibeh [Tue, 5 Nov 2024 18:14:02 +0000 (12:14 -0600)]
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)

5 months agotest: add test case for kernel blackhole routes 17357/head
anlan_cs [Fri, 1 Nov 2024 07:16:09 +0000 (15:16 +0800)]
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 0073a870d1b769e96b4f23d0422914200591062e)

5 months agozebra: fix missing kernel routes
anlan_cs [Thu, 31 Oct 2024 14:44:05 +0000 (22:44 +0800)]
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 44a82da405879b1318f046dc67893934b57cbf37)

5 months agoospfd: Use router_id what Zebra has if we remove a static router_id 17352/head
Donatas Abraitis [Thu, 31 Oct 2024 09:38:40 +0000 (11:38 +0200)]
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 1073e0f9b39b2810a114dea03f2d1e0b14e414d4)

5 months agoospfd: Add a hidden command for old `no router-id`
Donatas Abraitis [Thu, 31 Oct 2024 09:37:49 +0000 (11:37 +0200)]
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 80bfe6784fa945640251ae5c907899eb9d77cc0a)