Commit Graph

37171 Commits

Author SHA1 Message Date
Jafar Al-Gharaibeh
35dbbacc3b
Merge pull request #17317 from opensourcerouting/feature/allow_setting_custom_params_for_daemons_unified_config
tests: Add an ability to specify daemon params with unified config
2024-10-31 08:55:23 -05:00
Mark Stapp
87941fa261
Merge pull request #17318 from opensourcerouting/fix/add_missing_new_line_for_zebra_help
zebra: Add missing new line for help string
2024-10-31 09:13:56 -04:00
Nathan Bahr
180e1a0d77 tests: Add zebra rib import-table tests
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-31 12:44:05 +00:00
Donatas Abraitis
1073e0f9b3 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>
2024-10-31 11:38:40 +02:00
Donatas Abraitis
80bfe6784f 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>
2024-10-31 11:37:49 +02:00
Donatas Abraitis
25ae643996 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>
2024-10-31 10:47:48 +02:00
Donatas Abraitis
879466731b tests: Add an ability to specify daemon params with unified config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-31 10:43:28 +02:00
Donatas Abraitis
5f11235614
Merge pull request #17296 from LabNConsulting/liambrady/core-rlimit-respect-hard-limit
tests: respect RLIMIT_CORE hard limit
2024-10-31 10:19:55 +02:00
Jafar Al-Gharaibeh
7c1034087e
Merge pull request #17310 from opensourcerouting/fix/doc_build
doc: Create html_context before setting READTHEDOCS
2024-10-30 13:13:34 -05:00
Jafar Al-Gharaibeh
e2f3cfa518
Merge pull request #17311 from opensourcerouting/fix/syntax_topotests
doc: Use RST, not Markdown format for links
2024-10-30 12:49:43 -05:00
Donatas Abraitis
9397a5144b doc: Use RST, not Markdown format for links
Fixes: d155d62785 ("doc: Require unified config for all new topotests")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-10-30 14:26:07 +02:00
Donatas Abraitis
ef9f698e04 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>
2024-10-30 14:15:36 +02:00
Russ White
56d994aeca
Merge pull request #15563 from donaldsharp/bgp_musings
Bgp musings
2024-10-30 06:04:45 -04:00
Donatas Abraitis
4c1ee29116 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>
2024-10-30 10:45:28 +02:00
Nathan Bahr
1c50a553fc doc: Document zebra table import command with additional mrib flag
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-29 20:17:59 +00:00
Nathan Bahr
be2a7ed6af zebra: Add ability to import alternate tables into the MRIB
Expanded the cli command to include an mrib flag for importing to
the main table MRIB instead of the main table URIB.
Piped through specifying the safi through the import table functions
rather than hardcoding to SAFI_UNICAST.
Import still only import routes from the URIB subtable, only added the
ability to import into the main table MRIB.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-29 20:17:59 +00:00
Donald Sharp
5f6200d334 zebra: Deconfuse clang-sa about possible NULL pointer
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 16:05:15 -04:00
Donald Sharp
07e9004c62 bgpd: workaround clang-sa for set but not used value
Our switch statements with a default value confuse
clang-sa 19.  Make it happy.  Just following David's
earlier commit.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 16:03:45 -04:00
Donald Sharp
1115feedc3 bgpd: add some counters not displayed yet
Add some counters to keep track how often stuff is done.
This is mainly for us developers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Donald Sharp
e2090bf4c6 bgpd: Further extend show bgp attribute-info
Fill out a bit more data about what is being held.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Donald Sharp
a7f223636f bgpd: Optimize the usage of jhash
There are a bunch of jhash_1word uses.  Let's convert
to jhash_3word and get rid of some calls.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-29 14:11:06 -04:00
Joshua Muthii
5718ee37c7 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>
2024-10-29 13:15:43 -04:00
Joshua Muthii
d599aa1da6 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>
2024-10-29 13:15:16 -04:00
Liam Brady
b4dc01b3de tests: respect RLIMIT_CORE hard limit
In the case that the RLIMIT_CORE hard limit cannot
be raised on a system, do not fail due to an exception.
Instead, attempt to increase the soft limit to as large
a value as possible (e.g. to the set hard limit).

Signed-off-by: Liam Brady <lbrady@labn.net>
2024-10-29 13:07:57 -04:00
Russ White
56495a88df
Merge pull request #17251 from donaldsharp/bgp_best_path_evpn_issue
bgpd: bestpath failure when you have a singlepath not in holddown
2024-10-29 10:16:37 -04:00
Russ White
574a71516a
Merge pull request #17226 from louis-6wind/fix-bmp-tests
tests: fix bmp tests random failure
2024-10-29 10:12:11 -04:00
Russ White
b5c3b44de1
Merge pull request #17190 from baozhen-H3C/202410180176
isisd: The command "'show isis vrf all summary json" has no output.
2024-10-29 10:08:28 -04:00
Russ White
4a6e1c0acb
Merge pull request #16990 from lsang6WIND/label-per-nexthop
bgpd: fix prefix same as nexthop in label per nexthop
2024-10-29 10:05:37 -04:00
Donatas Abraitis
e42dd44123
Merge pull request #17245 from fdumontet6WIND/fix1
bgpd:  fix crash when polling bgp4v2PathAttrTable
2024-10-29 14:12:05 +02:00
Donatas Abraitis
e534d9cc7b
Merge pull request #17278 from pguibert6WIND/bmp_listener
bgpd: fix blank line in running-config with bmp listener cmd
2024-10-29 10:57:05 +02:00
Donatas Abraitis
cf6a575cbd
Merge pull request #17189 from Shbinging/fix_some_ospf_unset_commands_syntax
ospfd:fix syntax of some ospf no commands
2024-10-29 10:43:53 +02:00
Donatas Abraitis
60f77de79d
Merge pull request #17257 from pguibert6WIND/srv6_debug
zebra: add 'debug zebra srv6' command
2024-10-29 10:32:20 +02:00
Jafar Al-Gharaibeh
2945258c7c
Merge pull request #17254 from donaldsharp/mrib_nht_wonky
Mrib nht wonky
2024-10-28 16:20:20 -05:00
Donald Sharp
3bff65abc7 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-28 15:02:39 -04:00
Donald Sharp
811168ecc3 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>
2024-10-28 14:29:31 -04:00
Donald Sharp
aff8eaa4a2 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>
2024-10-28 14:10:06 -04:00
Donald Sharp
ea0b8a0364
Merge pull request #17200 from opensourcerouting/vtysh-fix-list-find
vtysh: fix `find` and `list` commands
2024-10-28 14:05:29 -04:00
Philippe Guibert
9a33ee18bf 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>
2024-10-28 16:41:09 +01:00
Philippe Guibert
a7fec9c387 zebra: add 'debug zebra srv6' command
Add a specific debug command to handle srv6 troubleshooting.
Move the srv6 traces that initially were under 'debug zebra packet'
debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-28 16:40:33 +01:00
Donatas Abraitis
1668f3262a
Merge pull request #17243 from louis-6wind/fix-bgp-local-label
bgpd: fix display of local label in show bgp
2024-10-28 16:33:50 +02:00
David Lamparter
e4df480831
Merge pull request #16354 from Sokolmish/zebra-no-ra 2024-10-28 13:28:29 +01:00
Donatas Abraitis
dd48a0b791
Merge pull request #17250 from pguibert6WIND/flexalgo_uint8
isisd: fix change flex-algorithm number from uint32 to uint8
2024-10-28 12:30:46 +02:00
Jafar Al-Gharaibeh
f11421d4ec
Merge pull request #17160 from opensourcerouting/fix/keep_zebra_on-rib-process_in_frr.conf
lib, zebra: Keep `zebra on-rib-process script` in frr.conf
2024-10-27 18:23:36 -05:00
Donatas Abraitis
200d54f54e
Merge pull request #17216 from Jafaral/fix-bsr
pimd, tests: fix bsr assert and expand topotest to pimv6
2024-10-27 21:11:23 +02:00
Donald Sharp
e0fd591e94
Merge pull request #17255 from systemcrash/patch-1
docs: Update evpn.rst
2024-10-26 20:38:26 -04:00
Paul Donald
217435b9f4 docs: Update evpn.rst
spelling

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-10-26 14:27:35 +02:00
Donald Sharp
c3eebccdc6 bgpd: bestpath failure when you have a singlepath not in holddown
When you have multiple paths to a particular route and a single
path changes.  In addition of the other paths are either in
hold down or not established or really just not selected you
could end up with a situation where the bestpath choosen
was a path that was in hold down.

Modify the code such that when there is nothing worse
in bestpath selection for the choosen path, but were
unable to do any sorting, just put the path on the top
of the list and declare it the winner.  Else just
do the original and put it at the end.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-25 17:22:13 -04:00
Francois Dumontet
ee2f1b85cf 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>
2024-10-25 22:25:35 +02:00
Philippe Guibert
8e861a75e8 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>
2024-10-25 22:17:29 +02:00
Louis Scalbert
e7b3276ace 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>
2024-10-25 17:56:57 +02:00