Commit Graph

36895 Commits

Author SHA1 Message Date
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
Mark Stapp
6fbc39904b
Merge pull request #17321 from FRRouting/mergify/bp/dev/10.2/pr-17318
zebra: Add missing new line for help string (backport #17318)
2024-10-31 12:00:42 -04:00
Donatas Abraitis
9474e8677e tests: Add an ability to specify daemon params with unified config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 879466731b)
2024-10-31 13:55:51 +00:00
Donatas Abraitis
c8341f265f
Merge pull request #17300 from FRRouting/mergify/bp/dev/10.2/pr-17250
isisd: fix change flex-algorithm number from uint32 to uint8 (backport #17250)
2024-10-31 15:17:02 +02:00
Donatas Abraitis
644211270f zebra: Add missing new line for help string
```
  -A, --asic-offload        FRR is interacting with an asic underneath the linux kernel
      --v6-with-v4-nexthops Underlying dataplane supports v6 routes with v4 nexthops  -s, --nl-bufsize          Set netlink receive buffer size
```

Fixes: 1f5611c06d ("zebra: Allow zebra cli to accept v6 routes with v4 nexthops")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 25ae643996)
2024-10-31 13:14:40 +00:00
Jafar Al-Gharaibeh
4e23ebed1e
Merge pull request #17315 from FRRouting/mergify/bp/dev/10.2/pr-17310
doc: Create html_context before setting READTHEDOCS (backport #17310)
2024-10-30 16:16:25 -05:00
Jafar Al-Gharaibeh
01be55aa5c
Merge pull request #17309 from donaldsharp/backport_17254_10.2
Mrib nht wonky (backport #17254)
2024-10-30 14:36:56 -05:00
Donatas Abraitis
410b406afe doc: Create html_context before setting READTHEDOCS
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/checkouts/latest/doc/user/conf.py", line 77, in <module>
    html_context["READTHEDOCS"] = True
    ^^^^^^^^^^^^
NameError: name 'html_context' is not defined

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ef9f698e04)
2024-10-30 18:14:56 +00:00
Donald Sharp
7ddbadd7f7 zebra: When installing a mroute, allow it to flow
Currently the mroute code was not allowing the mroute
to be sent to the dataplane.  This leaves us with a
situation where the routes being installed where never
being set as installed and additionally nht against
the mrib would not work if the route came into existence
after the nexthop tracking was asked for.

Turns out all the pieces where there to let this work.
Modify the code to pass it to the dplane and to send
it back up as having worked.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-30 07:47:32 -04:00
Donald Sharp
fb08f08ebb zebra: Add safi to some debugs
Trying to figure out what safi we are talking about is fun when
it is not put into the debugs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 811168ecc3)
2024-10-30 07:45:08 -04:00
Donald Sharp
d48fab2707 sharpd: Allow sharpd to watch nexthops in the mrib
Nothing special here, just allow sharpd to ask to watch
nexthops in the mrib.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit aff8eaa4a2)
2024-10-30 07:45:02 -04:00
Philippe Guibert
909e6dd621 isisd: fix change flex-algorithm number from uint32 to uint8
The algorithm number is encoded on 8 bits and does not require
an unsigned 32 bit value to store the value.

Fixes: cc4926c128 ("isisd,yang: add algorithm-prefix-sid configuration tree")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 8e861a75e8)
2024-10-30 08:43:56 +00:00
Russ White
0aacf8f93a
Merge pull request #17291 from FRRouting/mergify/bp/dev/10.2/pr-17245
bgpd:  fix crash when polling bgp4v2PathAttrTable (backport #17245)
2024-10-29 10:22:54 -04:00
Francois Dumontet
2432b6481e bgpd: fix crash when polling bgp4v2PathAttrTable
we have

(gdb) p *path->attr->aspath
$1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN}

It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV

fixe: return 0 when segments is null.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
(cherry picked from commit ee2f1b85cf)
2024-10-29 12:12:51 +00:00
Donatas Abraitis
dbda55017c
Merge pull request #17282 from FRRouting/mergify/bp/dev/10.2/pr-17278
bgpd: fix blank line in running-config with bmp listener cmd (backport #17278)
2024-10-29 13:17:07 +02:00
Philippe Guibert
a6cda19865 bgpd: fix blank line in running-config with bmp listener cmd
An extra blank line is added in show running-config with BMP:

> ubuntu2204hwe(config)# router bgp 65500
> ubuntu2204hwe(config-router)# bmp targets tgt
> ubuntu2204hwe(config-bgp-bmp)# bmp monitor ipv4 unicast pre-policy
> ubuntu2204hwe(config-bgp-bmp)# bmp listener 192.0.2.100 port 44
> ubuntu2204hwe(config-bgp-bmp)# do show running-config
>
> router bgp 65500
> [..]
>  bmp targets tgt
>   bmp monitor ipv4 unicast pre-policy
>                                       <-- blank line
>   bmp listener 192.0.2.100 port 44
>  exit

Remove the blank line.

Fixes: ed18356f1f ("bgpd/bmp: BMP implementation")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 9a33ee18bf)
2024-10-29 08:58:17 +00:00
Jafar Al-Gharaibeh
354537aa8d
Merge pull request #17277 from FRRouting/mergify/bp/dev/10.2/pr-17157
tests: logger masked in topotest.py (backport #17157)
2024-10-28 13:21:17 -05:00
Jafar Al-Gharaibeh
e144cc3ea7
Merge pull request #17265 from FRRouting/mergify/bp/dev/10.2/pr-16354
bgpd: add bgp ipv6-auto-ra command (backport #16354)
2024-10-28 12:53:35 -05:00
Jafar Al-Gharaibeh
36527bab2d
Merge pull request #17272 from FRRouting/mergify/bp/dev/10.2/pr-17243
bgpd: fix display of local label in show bgp (backport #17243)
2024-10-28 12:37:30 -05:00
Liam Brady
9a830b3cf4 tests: logger masked in topotest.py
a local logger masks the global logger and prevents errors from being
gracefully handled within topotest.py

Signed-off-by: Liam Brady <lbrady@labn.net>
(cherry picked from commit 1b38f33041)
2024-10-28 15:17:56 +00:00
Louis Scalbert
ebe0388c7d bgpd: fix display of local label in show bgp
Fix the display of the local label in show bgp.

> r1# show bgp ipv4 labeled-unicast 172.16.2.2/32
> BGP routing table entry for 172.16.2.2/32, version 2
> Local label: 16 <---- MISSING
> Paths: (1 available, best #1, table default, vrf (null))
>   Advertised to non peer-group peers:
>  192.168.1.2
>  65501
>    192.168.1.2 from 192.168.1.2 (172.16.2.2)
>      Origin IGP, metric 0, valid, external, best (First path received)
>      Remote label: 3
>      Last update: Fri Oct 25 17:55:45 2024

Fixes: 67f67ba481 ("bgpd: Drop label_ntop/label_pton functions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit e7b3276ace)
2024-10-28 14:37:07 +00:00
Jafar Al-Gharaibeh
f4f0e2cd38
Merge pull request #17258 from FRRouting/mergify/bp/dev/10.2/pr-17160
lib, zebra: Keep `zebra on-rib-process script` in frr.conf (backport #17160)
2024-10-28 08:56:04 -05:00
Mikhail Sokolovskiy
87823585cb bgpd: add bgp ipv6-auto-ra command
Introduce a command to stop bgpd from enabling IPv6 router advertisement
messages sending on interfaces.

Signed-off-by: Mikhail Sokolovskiy <sokolmish@gmail.com>
(cherry picked from commit 7b1c0c23fc)
2024-10-28 12:30:10 +00:00
Jafar Al-Gharaibeh
f6ef4e91e3
Merge pull request #17256 from FRRouting/mergify/bp/dev/10.2/pr-17216
pimd, tests: fix bsr assert and expand topotest to pimv6 (backport #17216)
2024-10-27 23:41:15 -05:00
Donatas Abraitis
b65f4ad423 lib, zebra: Keep zebra on-rib-process script in frr.conf
After the change:

```
$ grep on-rib-process /etc/frr/frr.conf
zebra on-rib-process script script4

$ systemctl restart frr

$ vtysh -c 'show run' | grep on-rib-process
zebra on-rib-process script script4
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 1fe1f8d87c)
2024-10-27 23:24:50 +00:00
Jafar Al-Gharaibeh
288d27431d tests: expand bsr topotest to cover ipv6
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
(cherry picked from commit a7e7cc301d)
2024-10-27 19:12:49 +00:00
Jafar Al-Gharaibeh
d2dd5da999 pimd: allow a bsr with higher priority to take over
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
(cherry picked from commit 4e74183d0f)
2024-10-27 19:12:49 +00:00
Jafar Al-Gharaibeh
943b96b181 pimd: allow resolving bsr via directly connected secondary address
This only matters to single hop nodes that are adjacent to the bsr. More common
with IPv6 where LL address is used in PIM as the primary address. If the BSR IP
happens to be an address on the same interface, the receiving pim router
rejects the BSR address because it expects the BSR IP to resolve via the LL address
even if we have a connected route for the same BSR IP subnet. Effectively, we want to
allow rpf to be resolved via secondary IPs with connected routes on the same interface,
and not limit them to primary addresses.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
(cherry picked from commit 8fbd88c5a7)
2024-10-27 19:12:48 +00:00
Donald Sharp
4309d9148b
Merge pull request #17232 from FRRouting/mergify/bp/dev/10.2/pr-17215
pimd: PIM autorp no path RP fix (backport #17215)
2024-10-25 07:34:00 -04:00
Donatas Abraitis
6b6422899b
Merge pull request #17234 from FRRouting/mergify/bp/dev/10.2/pr-17199
bgpd: compare aigp after local route check in bgp_path_info_cmp() (backport #17199)
2024-10-25 13:10:24 +03:00