]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
15 months agoMerge pull request #15210 from opensourcerouting/fix/use_enum_for_graceful_restart_prints
Donald Sharp [Wed, 24 Jan 2024 17:25:57 +0000 (12:25 -0500)]
Merge pull request #15210 from opensourcerouting/fix/use_enum_for_graceful_restart_prints

bgpd: Fix format overflow for graceful-restart debug logs

15 months agoMerge pull request #15173 from louis-6wind/nhrp-noarp
Donald Sharp [Wed, 24 Jan 2024 15:53:29 +0000 (10:53 -0500)]
Merge pull request #15173 from louis-6wind/nhrp-noarp

nhrpd: unset noarp flag using a zapi message

15 months agoMerge pull request #15196 from idryzhov/nb-leaf-list
Donald Sharp [Wed, 24 Jan 2024 15:49:52 +0000 (10:49 -0500)]
Merge pull request #15196 from idryzhov/nb-leaf-list

lib: remove leaf-list xpath hack from northbound

15 months agoMerge pull request #15209 from opensourcerouting/fix/whitespaces
Donald Sharp [Wed, 24 Jan 2024 15:48:22 +0000 (10:48 -0500)]
Merge pull request #15209 from opensourcerouting/fix/whitespaces

bgpd: Use single whitespace when displaying show bgp summary

15 months agoMerge pull request #15189 from opensourcerouting/fix/doc_label-table_json
Donald Sharp [Wed, 24 Jan 2024 15:47:41 +0000 (10:47 -0500)]
Merge pull request #15189 from opensourcerouting/fix/doc_label-table_json

doc: Add missing json keyword for `show debugging label-table`

15 months agoMerge pull request #15211 from pguibert6WIND/json_compilation_pceplib
Donald Sharp [Wed, 24 Jan 2024 13:50:30 +0000 (08:50 -0500)]
Merge pull request #15211 from pguibert6WIND/json_compilation_pceplib

pceplib: fix compilation error

15 months agonhrpd: remove netlink_configure_arp declaration 15173/head
Louis Scalbert [Thu, 11 Jan 2024 10:38:11 +0000 (11:38 +0100)]
nhrpd: remove netlink_configure_arp declaration

Remove the unused netlink_configure_arp() declaration.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agotopotests: nhrp_topo, test absence of noarp flag
Louis Scalbert [Thu, 11 Jan 2024 10:17:54 +0000 (11:17 +0100)]
topotests: nhrp_topo, test absence of noarp flag

Test the absence the NOARP flag on rX-gre0 interfaces. It is present by
default.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agonhrpd: unset noarp flag using a zapi message
Louis Scalbert [Thu, 11 Jan 2024 10:25:36 +0000 (11:25 +0100)]
nhrpd: unset noarp flag using a zapi message

Unset the IFF_NOARP interface flag using a ZAPI message. It removes the
dependency to if.h headers.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agolib,zebra: add zapi message to control noarp flag
Louis Scalbert [Thu, 11 Jan 2024 10:24:20 +0000 (11:24 +0100)]
lib,zebra: add zapi message to control noarp flag

Add a ZAPI message to control the setting of the IFF_NOARP flag.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agopceplib: fix compilation error 15211/head
Philippe Guibert [Wed, 24 Jan 2024 08:10:17 +0000 (09:10 +0100)]
pceplib: fix compilation error

The following compilation error happens, with pcep test files.

> In file included from pceplib/test/pcep_utils_counters_test.c:31:
> pceplib/test/pcep_utils_counters_test.c: In function 'test_create_subgroup_counter':
> pceplib/test/pcep_utils_counters_test.c:127:25: error: too few arguments to function 'create_subgroup_counter'
>   127 |         CU_ASSERT_FALSE(create_subgroup_counter(subgroup, counter_id + 1,
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~
> In file included from pceplib/test/pcep_utils_counters_test.c:33:
> ./pceplib/pcep_utils_counters.h:163:6: note: declared here
>   163 | bool create_subgroup_counter(struct counters_subgroup *subgroup,
>       |      ^~~~~~~~~~~~~~~~~~~~~~~
> Makefile:10948: recipe for target 'pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o' failed
> make[3]: *** [pceplib/test/pceplib_test_pcep_utils_tests-pcep_utils_counters_test.o] Error 1
> make[3]: *** Waiting for unfinished jobs....

There is a missing parameter.

Fixes: 09047d2bf614 ("pceplib: add json string option to subgroup counter")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agobgpd: Fix format overflow for graceful-restart debug logs 15210/head
Donatas Abraitis [Wed, 24 Jan 2024 06:57:56 +0000 (08:57 +0200)]
bgpd: Fix format overflow for graceful-restart debug logs

Use enum instead of int, and make the compiler happy when using -format-overflow.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agoMerge pull request #15203 from donaldsharp/sharp_neigh_coverity
Donatas Abraitis [Wed, 24 Jan 2024 06:35:33 +0000 (08:35 +0200)]
Merge pull request #15203 from donaldsharp/sharp_neigh_coverity

sharpd: Fix coverity issues

15 months agoMerge pull request #15202 from idryzhov/mgmt-log
Donald Sharp [Tue, 23 Jan 2024 18:55:44 +0000 (13:55 -0500)]
Merge pull request #15202 from idryzhov/mgmt-log

mgmtd: remove unguarded debug log

15 months agoMerge pull request #15201 from louis-6wind/fix-rpki-coverity
Donatas Abraitis [Tue, 23 Jan 2024 18:52:53 +0000 (20:52 +0200)]
Merge pull request #15201 from louis-6wind/fix-rpki-coverity

bgpd: fix RPKI coverity scanner issues

15 months agodoc: Drop single whitespace from show bgp outputs 15209/head
Donatas Abraitis [Tue, 23 Jan 2024 18:42:30 +0000 (20:42 +0200)]
doc: Drop single whitespace from show bgp outputs

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agobgpd: Use single whitespace when displaying show bgp summary
Donatas Abraitis [Tue, 23 Jan 2024 18:41:49 +0000 (20:41 +0200)]
bgpd: Use single whitespace when displaying show bgp summary

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agoMerge pull request #15197 from idryzhov/pim-nb-fix
Donald Sharp [Tue, 23 Jan 2024 15:37:55 +0000 (10:37 -0500)]
Merge pull request #15197 from idryzhov/pim-nb-fix

pimd: fix crash when configuring ssmpingd

15 months agosharpd: Fix coverity issues 15203/head
Donald Sharp [Tue, 23 Jan 2024 15:28:30 +0000 (10:28 -0500)]
sharpd: Fix coverity issues

New commits had an assignment instead of a comparison
option.  Coverity wisely found it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #15165 from vjardin/ospf_ptmp_unumbered
Donatas Abraitis [Tue, 23 Jan 2024 15:22:28 +0000 (17:22 +0200)]
Merge pull request #15165 from vjardin/ospf_ptmp_unumbered

tests: ospf point-to-multipoint and prefix-suppress

15 months agoMerge pull request #15195 from idryzhov/vtysh-vrf-fix
Donatas Abraitis [Tue, 23 Jan 2024 15:20:44 +0000 (17:20 +0200)]
Merge pull request #15195 from idryzhov/vtysh-vrf-fix

vtysh: fix VTYSH_VRF definition

15 months agobgpd: check sockopt returns in rpki_create_socket 15201/head
Louis Scalbert [Tue, 23 Jan 2024 08:51:15 +0000 (09:51 +0100)]
bgpd: check sockopt returns in rpki_create_socket

Check (g|s)etsockopt returns in rpki_create_socket(). Coverity scanner
issues 1575916 and 1575924.

Fixes: a951752d4a ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix memory leak in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 10:52:04 +0000 (11:52 +0100)]
bgpd: fix memory leak in rpki_create_socket

Fix memory leak in rpki_create_socket. Coverity scanner issue 1575914.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix res validity in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 10:52:59 +0000 (11:52 +0100)]
bgpd: fix res validity in rpki_create_socket

Fix coverity scanner issue 1575912 where res pointer is supposed to
valid in:

> socket = vrf_socket(res->ai_family, ...)

but is checked for validity a few lines later.

Note that vrf_getaddrinfo returns an error code if getaddrinfo() fails
to allocate res and in this case, rpki_create_socket() returns.

Fixes: a951752 ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix deference before check in rpki_create_socket
Louis Scalbert [Tue, 23 Jan 2024 08:29:26 +0000 (09:29 +0100)]
bgpd: fix deference before check in rpki_create_socket

Fix deference before check coverity scanner issue 1575918 in
rpki_create_socket()

Fixes: a951752d4a ("bgpd: create cache server socket in vrf")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: fix potential null pointers in rpki
Louis Scalbert [Tue, 23 Jan 2024 08:16:24 +0000 (09:16 +0100)]
bgpd: fix potential null pointers in rpki

Fix potential NULL pointer in RPKI code. Coverity scanner issues: 1575911
1575913157591515759171575919 to 15759231575925 and 1575926.

Fixes: 1420189c11 ("bgpd: add support of rpki in vrf configure context")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agomgmtd: remove unguarded debug log 15202/head
Igor Ryzhov [Tue, 23 Jan 2024 10:36:22 +0000 (12:36 +0200)]
mgmtd: remove unguarded debug log

The log doesn't provide any valuable information, so removing it instead
of adding a check.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: remove leaf-list xpath hack from northbound 15196/head
Igor Ryzhov [Tue, 23 Jan 2024 00:09:25 +0000 (02:09 +0200)]
lib: remove leaf-list xpath hack from northbound

Currently, when editing a leaf-list, `nb_candidate_edit` expects to
receive it's xpath without a predicate and the value in a separate
argument, and then creates the full xpath. This hack is complicated,
because it depends on the operation and on the caller being a backend or
not. Instead, let's require to always include the predicate in a
leaf-list xpath. Update all the usages in the code accordingly.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agopimd: fix crash when configuring ssmpingd 15197/head
Igor Ryzhov [Tue, 23 Jan 2024 00:32:22 +0000 (02:32 +0200)]
pimd: fix crash when configuring ssmpingd

Command: `ip ssmpingd 1.1.1.1`

Backtrace:
```
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
0x00007fd1d3b02859 in __GI_abort () at abort.c:79
0x00007fd1d3e323e1 in yang_dnode_xpath_get_canon (dnode=<optimized out>, xpath_fmt=<optimized out>, ap=<optimized out>) at lib/yang_wrappers.c:61
0x00007fd1d3e34f41 in yang_dnode_get_ipv4 (addr=addr@entry=0x7ffc368554d4, dnode=<optimized out>, xpath_fmt=xpath_fmt@entry=0x5556af8680d4 "./source-addr") at lib/yang_wrappers.c:826
0x00005556af8216d3 in routing_control_plane_protocols_control_plane_protocol_pim_address_family_ssm_pingd_source_ip_create (args=0x7ffc36855530) at pimd/pim_nb_config.c:925
0x00007fd1d3dec13f in nb_callback_create (nb_node=0x5556b197ea40, nb_node=0x5556b197ea40, errmsg_len=8192, errmsg=0x7ffc36855a90 "", resource=0x5556b18fa6f8, dnode=0x5556b1ad7a10, event=NB_EV_APPLY, context=0x5556b1ad75c0) at lib/northbound.c:1260
nb_callback_configuration (context=0x5556b1ad75c0, event=NB_EV_APPLY, change=<optimized out>, errmsg=0x7ffc36855a90 "", errmsg_len=8192) at lib/northbound.c:1648
0x00007fd1d3deca6c in nb_transaction_process (event=event@entry=NB_EV_APPLY, transaction=transaction@entry=0x5556b1ad75c0, errmsg=errmsg@entry=0x7ffc36855a90 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1779
0x00007fd1d3decdd6 in nb_candidate_commit_apply (transaction=0x5556b1ad75c0, save_transaction=save_transaction@entry=true, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffc36855a90 "", errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:1129
0x00007fd1d3decf15 in nb_candidate_commit (context=..., candidate=<optimized out>, save_transaction=save_transaction@entry=true, comment=comment@entry=0x0, transaction_id=transaction_id@entry=0x0, errmsg=0x7ffc36855a90 "", errmsg_len=8192) at lib/northbound.c:1162
0x00007fd1d3ded4af in nb_cli_classic_commit (vty=vty@entry=0x5556b1ada2a0) at lib/northbound_cli.c:50
0x00007fd1d3df025f in nb_cli_apply_changes_internal (vty=vty@entry=0x5556b1ada2a0, xpath_base=xpath_base@entry=0x7ffc36859b50 ".", clear_pending=clear_pending@entry=false) at lib/northbound_cli.c:177
0x00007fd1d3df06ad in nb_cli_apply_changes (vty=vty@entry=0x5556b1ada2a0, xpath_base_fmt=xpath_base_fmt@entry=0x0) at lib/northbound_cli.c:233
0x00005556af80fdd5 in pim_process_ssmpingd_cmd (vty=0x5556b1ada2a0, operation=NB_OP_CREATE, src_str=0x5556b1ad9630 "1.1.1.1") at pimd/pim_cmd_common.c:3423
0x00007fd1d3da7b0e in cmd_execute_command_real (vline=vline@entry=0x5556b1ac9520, vty=vty@entry=0x5556b1ada2a0, cmd=cmd@entry=0x0, up_level=up_level@entry=0) at lib/command.c:982
0x00007fd1d3da7cb1 in cmd_execute_command (vline=vline@entry=0x5556b1ac9520, vty=vty@entry=0x5556b1ada2a0, cmd=0x0, vtysh=vtysh@entry=0) at lib/command.c:1040
0x00007fd1d3da7e50 in cmd_execute (vty=vty@entry=0x5556b1ada2a0, cmd=cmd@entry=0x5556b1ae0a30 "ip ssmpingd 1.1.1.1", matched=matched@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:1207
0x00007fd1d3e278be in vty_command (vty=vty@entry=0x5556b1ada2a0, buf=<optimized out>) at lib/vty.c:591
0x00007fd1d3e27afd in vty_execute (vty=0x5556b1ada2a0) at lib/vty.c:1354
0x00007fd1d3e2bb23 in vtysh_read (thread=<optimized out>) at lib/vty.c:2362
0x00007fd1d3e22254 in event_call (thread=thread@entry=0x7ffc3685cd80) at lib/event.c:2003
0x00007fd1d3dce9e8 in frr_run (master=0x5556b183c830) at lib/libfrr.c:1218
0x00005556af803653 in main (argc=6, argv=<optimized out>, envp=<optimized out>) at pimd/pim_main.c:162
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15179 from donaldsharp/zebra_neigh_update
Donatas Abraitis [Tue, 23 Jan 2024 06:51:26 +0000 (08:51 +0200)]
Merge pull request #15179 from donaldsharp/zebra_neigh_update

Zebra neigh update

15 months agoMerge pull request #15193 from idryzhov/fix-bgp-rmap-probability
Donatas Abraitis [Tue, 23 Jan 2024 06:49:30 +0000 (08:49 +0200)]
Merge pull request #15193 from idryzhov/fix-bgp-rmap-probability

bgpd: fix route-map match probability deconfiguration callback

15 months agoMerge pull request #15194 from idryzhov/dist-list-fixes
Christian Hopps [Tue, 23 Jan 2024 01:44:01 +0000 (20:44 -0500)]
Merge pull request #15194 from idryzhov/dist-list-fixes

distribute-list fixes and improvements

15 months agovtysh: fix VTYSH_VRF definition 15195/head
Igor Ryzhov [Mon, 22 Jan 2024 22:17:26 +0000 (00:17 +0200)]
vtysh: fix VTYSH_VRF definition

VTYSH_VRF is a collection of daemon flags, not node flags. The current
code works only because RPKI_VRF_NODE is 1100101 in binary, which
accidentally includes VTYSH_BGPD which is actually needed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoripngd: use correct autocompletion for distribute-list commands 15194/head
Igor Ryzhov [Mon, 22 Jan 2024 21:44:17 +0000 (23:44 +0200)]
ripngd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate. Also, fix missing "IPv6"
docstring and use correct address family.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoripd: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:34:56 +0000 (23:34 +0200)]
ripd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoeigrpd: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:21:58 +0000 (23:21 +0200)]
eigrpd: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate. Also, use address-family-specific
autocompletion.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobabeld: use correct autocompletion for distribute-list commands
Igor Ryzhov [Mon, 22 Jan 2024 21:21:02 +0000 (23:21 +0200)]
babeld: use correct autocompletion for distribute-list commands

Currently, we always use access-list autocompletion, even if configuring
prefix-lists. We should differentiate.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: add address-family-specific autocompletion for prefix-lists
Igor Ryzhov [Mon, 22 Jan 2024 21:20:31 +0000 (23:20 +0200)]
lib: add address-family-specific autocompletion for prefix-lists

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: remove global list of distribute-lists
Igor Ryzhov [Mon, 22 Jan 2024 21:00:43 +0000 (23:00 +0200)]
lib: remove global list of distribute-lists

It's not needed anymore, all daemons always pass context.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobabeld: pass distribute ctx to distribute-list functions
Igor Ryzhov [Mon, 22 Jan 2024 21:00:18 +0000 (23:00 +0200)]
babeld: pass distribute ctx to distribute-list functions

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoeigrpd: convert distribute-list configuration to northbound
Igor Ryzhov [Mon, 22 Jan 2024 20:52:50 +0000 (22:52 +0200)]
eigrpd: convert distribute-list configuration to northbound

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agobgpd: fix route-map match probability deconfiguration callback 15193/head
Igor Ryzhov [Mon, 22 Jan 2024 20:31:21 +0000 (22:31 +0200)]
bgpd: fix route-map match probability deconfiguration callback

Add missing break. Currently, lib_route_map_entry_match_destroy is
called on every commit stage, but it should run only on APPLY.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agosharpd: Allow sharpd to listen to neighbor events 15179/head
Donald Sharp [Fri, 19 Jan 2024 20:13:49 +0000 (15:13 -0500)]
sharpd: Allow sharpd to listen to neighbor events

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agolib, nhrpd: Move neighbor reg/unreg to lib/zclient.c
Donald Sharp [Fri, 19 Jan 2024 19:51:34 +0000 (14:51 -0500)]
lib, nhrpd: Move neighbor reg/unreg to lib/zclient.c

This is needed to be generic.  Let's make it so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months ago*: Rename ZEBRA_NHRP_NEIGH_XXX to ZEBRA_NEIGH_XXX
Donald Sharp [Fri, 19 Jan 2024 19:45:25 +0000 (14:45 -0500)]
*: Rename ZEBRA_NHRP_NEIGH_XXX to ZEBRA_NEIGH_XXX

This does not need to be nhrp specific.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agoMerge pull request #15185 from LabNConsulting/chopps/distlist
Igor Ryzhov [Mon, 22 Jan 2024 14:52:45 +0000 (16:52 +0200)]
Merge pull request #15185 from LabNConsulting/chopps/distlist

add northbound support to distribute-list code.

15 months agoMerge pull request #15052 from louis-6wind/rpki-vrf-92
Donatas Abraitis [Mon, 22 Jan 2024 14:16:34 +0000 (16:16 +0200)]
Merge pull request #15052 from louis-6wind/rpki-vrf-92

bgpd: add VRF support to RPKI

15 months agoripngd: use new distribute-list northbound code. 15185/head
Christian Hopps [Sun, 21 Jan 2024 21:19:28 +0000 (21:19 +0000)]
ripngd: use new distribute-list northbound code.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoripd: use new distribute-list northbound code.
Christian Hopps [Sun, 21 Jan 2024 14:01:58 +0000 (14:01 +0000)]
ripd: use new distribute-list northbound code.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: enable multiple instance support with distribute lists
Christian Hopps [Mon, 22 Jan 2024 01:15:38 +0000 (01:15 +0000)]
lib: enable multiple instance support with distribute lists

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: add northbound support to distribute-list code.
Christian Hopps [Sun, 21 Jan 2024 13:12:39 +0000 (13:12 +0000)]
lib: add northbound support to distribute-list code.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15176 from LabNConsulting/chopps/mgmtd-northbound-fixes
Igor Ryzhov [Mon, 22 Jan 2024 10:48:15 +0000 (12:48 +0200)]
Merge pull request #15176 from LabNConsulting/chopps/mgmtd-northbound-fixes

Chopps/mgmtd northbound fixes

15 months agodoc: Add missing json keyword for `show debugging label-table` 15189/head
Donatas Abraitis [Sun, 21 Jan 2024 21:15:37 +0000 (23:15 +0200)]
doc: Add missing json keyword for `show debugging label-table`

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
15 months agotests: ospf point-to-multipoint and suppress 15165/head
Vincent Jardin [Tue, 16 Jan 2024 22:39:34 +0000 (23:39 +0100)]
tests: ospf point-to-multipoint and suppress

Per the RFC6860, check OSPFv2 using point-to-multipoint
over Ethernet.
Enable the behavior of the RFC6860 using:
  ip ospf prefix-suppress A.B.C.D
See:
  https://www.rfc-editor.org/rfc/rfc6860#section-2.3.2.2

Note that nexthops are not required to assess the checks.

Signed-off-by: Vincent Jardin <vjardin@free.fr>
15 months agoMerge pull request #15125 from pguibert6WIND/srte_pcep_session_json
Donatas Abraitis [Sun, 21 Jan 2024 19:33:35 +0000 (21:33 +0200)]
Merge pull request #15125 from pguibert6WIND/srte_pcep_session_json

Dump PCEP session in json format

15 months agoMerge pull request #15184 from donaldsharp/zebra_touchups
Donatas Abraitis [Sun, 21 Jan 2024 15:02:26 +0000 (17:02 +0200)]
Merge pull request #15184 from donaldsharp/zebra_touchups

Zebra touchups

15 months agolib: cleanup yang lint warnings
Christian Hopps [Sat, 20 Jan 2024 00:33:09 +0000 (00:33 +0000)]
lib: cleanup yang lint warnings

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15178 from donaldsharp/update_unnumbered_doc
Donatas Abraitis [Sun, 21 Jan 2024 11:45:45 +0000 (13:45 +0200)]
Merge pull request #15178 from donaldsharp/update_unnumbered_doc

doc: Update bgp unnumbered documentation

15 months agoMerge pull request #15183 from donaldsharp/zebra_nhg_worms
Donatas Abraitis [Sun, 21 Jan 2024 11:43:35 +0000 (13:43 +0200)]
Merge pull request #15183 from donaldsharp/zebra_nhg_worms

zebra: Fix NEXTHOP_GROUP_FPM define value

15 months agozebra: use break instead of goto 15184/head
Donald Sharp [Sat, 20 Jan 2024 23:50:49 +0000 (18:50 -0500)]
zebra: use break instead of goto

There is a goto statement that would be better served
with a break statement.  Let's try to minimize this
in the code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agozebra: Remove function that just calls another function
Donald Sharp [Sat, 20 Jan 2024 23:46:58 +0000 (18:46 -0500)]
zebra: Remove function that just calls another function

Why not just call the one function?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agozebra: Fix NEXTHOP_GROUP_FPM define value 15183/head
Donald Sharp [Sun, 21 Jan 2024 00:10:07 +0000 (19:10 -0500)]
zebra: Fix NEXTHOP_GROUP_FPM define value

The NEXTHOP_GROUP_FPM #define conflicts with
NEXTHOP_GROUP_KEEP_AROUND.  Not ideal let's fix
this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agodoc: Update bgp unnumbered documentation 15178/head
Donald Sharp [Fri, 19 Jan 2024 18:37:36 +0000 (13:37 -0500)]
doc: Update bgp unnumbered documentation

Mention the limitations of this type of peering
in bgp.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agomgmtd: remove heavy duplication in mgmtd config read 15176/head
Christian Hopps [Thu, 18 Jan 2024 17:06:45 +0000 (17:06 +0000)]
mgmtd: remove heavy duplication in mgmtd config read

Previously each container created all it's decendents before descending into
the children and repeating the process.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: better conditionalize leaf-list predicate xpath addition
Christian Hopps [Thu, 18 Jan 2024 04:17:35 +0000 (04:17 +0000)]
lib: better conditionalize leaf-list predicate xpath addition

If we're in the backend we already have the predicate added by mgmtd -- don't
add it again.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agolib: libyang logging temp off to avoid unwanted log message
Christian Hopps [Fri, 19 Jan 2024 15:25:57 +0000 (15:25 +0000)]
lib: libyang logging temp off to avoid unwanted log message

We don't want libyang logging when an schema path doesn't exist
since this is an acceptable outcome.

Signed-off-by: Christian Hopps <chopps@labn.net>
15 months agoMerge pull request #15175 from idryzhov/affinity-map-fixes
Christian Hopps [Fri, 19 Jan 2024 13:40:09 +0000 (08:40 -0500)]
Merge pull request #15175 from idryzhov/affinity-map-fixes

15 months agoMerge pull request #15168 from mjstapp/daemon_logs
Donatas Abraitis [Fri, 19 Jan 2024 08:56:15 +0000 (10:56 +0200)]
Merge pull request #15168 from mjstapp/daemon_logs

lib,vtysh: add per-daemon log file config

15 months agozebra: fix default value for affinity-mode 15175/head
Igor Ryzhov [Fri, 19 Jan 2024 01:21:53 +0000 (03:21 +0200)]
zebra: fix default value for affinity-mode

- initialize the necessary bit when creating if_link_params
- fix CLI description to mark extended as the default mode
- correctly set mode to extended when using the "no" form of the command
- handle the "show_defaults" parameter correctly in cli_show callback

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: remove unnecessary checks from CLI
Igor Ryzhov [Fri, 19 Jan 2024 01:01:40 +0000 (03:01 +0200)]
zebra: remove unnecessary checks from CLI

First, any data tree validation in CLI handler is not correct, because
this code won't be called when the change is done through any other
frontend. Second, these checks are not necessary at all, because NB
layer handles the change between admin-grp/affinity automatically.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: fix link-params admin-grp config output
Igor Ryzhov [Fri, 19 Jan 2024 00:56:45 +0000 (02:56 +0200)]
zebra: fix link-params admin-grp config output

- it was not printed at all because of the incorrect `yang_dnode_exist`
  check
- the intended output was "admin-group" instead of "admin-grp" used in
  the actual CLI command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agozebra: rework affinity-map update hook
Igor Ryzhov [Fri, 19 Jan 2024 00:38:43 +0000 (02:38 +0200)]
zebra: rework affinity-map update hook

Don't use config tree when updating internal daemon state. Everything
needed is already stored in internal structures.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: make affinity-map value mandatory
Igor Ryzhov [Thu, 18 Jan 2024 23:52:41 +0000 (01:52 +0200)]
lib: make affinity-map value mandatory

There can't be an affinity map without a bit position.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: validate affinity-map bit position using the yang model
Igor Ryzhov [Thu, 18 Jan 2024 23:40:21 +0000 (01:40 +0200)]
lib: validate affinity-map bit position using the yang model

When affinity mode is "standard", bit position cannot be greater than
31. Add a "must" statement to the YANG model to validate this, and
remove our custom validation code that does the same.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: make affinity-map value unique in the yang model
Igor Ryzhov [Thu, 18 Jan 2024 21:39:32 +0000 (23:39 +0200)]
lib: make affinity-map value unique in the yang model

It allows us to remove the code that does the same thing manually.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agolib: validate affinity-map reference using yang model
Igor Ryzhov [Thu, 18 Jan 2024 21:27:56 +0000 (23:27 +0200)]
lib: validate affinity-map reference using yang model

Change the type of affinity leaf-list in frr-zebra to a leafref with
"require-instance" property set to true. This change tells libyang to
automatically check that affinity-map exists before usage and doesn't
allow it to be deleted if it's referenced. It allows us to remove all
the manual code that is doing the same thing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
15 months agoMerge pull request #15172 from donaldsharp/evpn_mh_bridge_fix
Jafar Al-Gharaibeh [Thu, 18 Jan 2024 21:25:48 +0000 (15:25 -0600)]
Merge pull request #15172 from donaldsharp/evpn_mh_bridge_fix

tests: Fix test_evpn_mh.py to correctly call bridge program

15 months agopathd: add 'show sr-te pcep session json' support 15125/head
Philippe Guibert [Wed, 10 Jan 2024 14:25:03 +0000 (15:25 +0100)]
pathd: add 'show sr-te pcep session json' support

Add support to dump sr-te pcep session in json output.

> ubuntu2204# show sr-te pcep session
> PCE q
>  PCE IP 192.0.2.40 port 4189
>  PCC IP 192.0.2.10 port 4189
>  PCC MSD 10
>  Session Status UP
>  Precedence 10, best candidate
>  Confidence normal
>  Timer: KeepAlive config 30, pce-negotiated 70
>  Timer: DeadTimer config 120, pce-negotiated 120
>  Timer: PcRequest 30
>  Timer: SessionTimeout Interval 30
>  Timer: Delegation Timeout 10
>  No TCP MD5 Auth
>  PCE SR Version draft07
>  Next PcReq ID 5
>  Next PLSP  ID 2
>  Connected for 171 seconds, since 2023-10-28 09:36:44 UTC
>  PCC Capabilities: [PCC Initiated LSPs] [Stateful PCE] [SR TE PST]
>  PCE Capabilities: [Stateful PCE] [SR TE PST]
>  PCEP Message Statistics
>                         Sent   Rcvd
>          Message Open:     2      1
>     Message KeepAlive:     1      6
>         Message PcReq:     4      0
>         Message PcRep:     0      0
>        Message Notify:     4      0
>         Message Error:     0      5
>         Message Close:     0      0
>        Message Report:     5      0
>        Message Update:     0      1
>      Message Initiate:     0      0
>      Message StartTls:     0      0
>     Message Erroneous:     0      0
>                 Total:    16     13
> PCEP Sessions => Configured 1 ; Connected 1
> ubuntu2204# show sr-te pcep session  json
> {
>   "pcepSessions":[
>     {
>       "pceName":"q",
>       "pceAddress":"192.0.2.40",
>       "pcePort":4189,
>       "pccAddress":"192.0.2.10",
>       "pccPort":4189,
>       "pccMsd":10,
>       "sessionStatus":"UP",
>       "bestMultiPce":true,
>       "precedence":10,
>       "confidence":"normal",
>       "keepaliveConfig":30,
>       "deadTimerConfig":120,
>       "pccPcepRequestTimerConfig":30,
>       "sessionTimeoutIntervalSec":30,
>       "delegationTimeout":10,
>       "tcpMd5Authentication":false,
>       "draft07":true,
>       "draft16AndRfc8408":false,
>       "nextPcRequestId":5,
>       "nextPLspId":2,
>       "sessionKeepalivePceNegotiatedSec":70,
>       "sessionDeadTimerPceNegotiatedSec":120,
>       "sessionConnectionDurationSec":177,
>       "sessionConnectionStartTimeUTC":"2023-10-28 09:36:44",
>       "pccCapabilities":" [PCC Initiated LSPs] [Stateful PCE] [SR TE PST]",
>       "pceCapabilities":" [Stateful PCE] [SR TE PST]",
>       "messageStatisticsReceived":{
>         "messageOpen":1,
>         "messageKeepalive":6,
>         "messagePcReq":0,
>         "messagePcRep":0,
>         "messageNotify":0,
>         "messageError":5,
>         "messageClose":0,
>         "messageReport":0,
>         "messageUpdate":1,
>         "messageInitiate":0,
>         "messageStartTls":0,
>         "messageErroneous":0,
>         "total":13
>       },
>       "messageStatisticsSent":{
>         "messageOpen":2,
>         "messageKeepalive":1,
>         "messagePcReq":4,
>         "messagePcRep":0,
>         "messageNotify":4,
>         "messageError":0,
>         "messageClose":0,
>         "messageReport":5,
>         "messageUpdate":0,
>         "messageInitiate":0,
>         "messageStartTls":0,
>         "messageErrneous":0,
>         "total":16
>       }
>     }
>   ],
>   "pcepSessionsConfigured":1,
>   "pcepSessionsConnected":1
> }

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agopceplib: add json string option to subgroup counter
Philippe Guibert [Wed, 10 Jan 2024 14:26:05 +0000 (15:26 +0100)]
pceplib: add json string option to subgroup counter

The created counters in pceplib library are structures with
a string attribute which is used for further display. This
string information is not formatted for json output.

Add a second option in the create_subgroup_counter() creation
API to provide the json attribute output.

Create a json naming compatible with caml format for each
subgroup counter used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
15 months agotests: Fix test_evpn_mh.py to correctly call bridge program 15172/head
Donald Sharp [Thu, 18 Jan 2024 14:58:50 +0000 (09:58 -0500)]
tests: Fix test_evpn_mh.py to correctly call bridge program

Getting this error:

2024-01-17 19:05:20,688 WARNING: torm11: Router(torm11): proc failed: rc 255 pid 2436134
args: /usr/bin/nsenter --mount=/proc/2435168/ns/mnt --net=/proc/2435168/ns/net --uts=/proc/2435168/ns/uts -F /bin/bash -c /sbin/bridge vlan add vid 1000 dev bridge
stdout: RTNETLINK answers: Operation not supported
stderr: *empty*

As I understand it the correct thing to do here is pass in:
bridge vlan add vid 1000 dev bridge self

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
15 months agodoc: add doc for daemon-specific log cli 15168/head
Mark Stapp [Thu, 18 Jan 2024 13:30:01 +0000 (08:30 -0500)]
doc: add doc for daemon-specific log cli

Add doc for the daemon-specific log file cli

Signed-off-by: Mark Stapp <mjs@labn.net>
15 months agotopotests: add vrf test to bgp_rpki_topo1 15052/head
Louis Scalbert [Mon, 18 Dec 2023 12:04:11 +0000 (13:04 +0100)]
topotests: add vrf test to bgp_rpki_topo1

Add vrf test to bgp_rpki_topo1

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add show bgp rpki prefix-count command
Philippe Guibert [Thu, 12 Mar 2020 09:26:31 +0000 (10:26 +0100)]
bgpd: add show bgp rpki prefix-count command

Add "show bgp rpki prefix-count" command to show the number of received
prefixes from RPKI cache servers.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: add information for per vrf rpki commands
Philippe Guibert [Thu, 19 Sep 2019 14:52:45 +0000 (16:52 +0200)]
doc: add information for per vrf rpki commands

Add documentation for per VRF RPKI commands

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: remove rpki ssh local server public key
Louis Scalbert [Thu, 18 Jan 2024 10:19:00 +0000 (11:19 +0100)]
doc: remove rpki ssh local server public key

It is not used anymore.

Fixes: 2a5f5ec00f ("bgpd: Drop SSH public key for RPKI CLI option")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: fix rpki ipv4 address family example
Louis Scalbert [Thu, 18 Jan 2024 10:15:11 +0000 (11:15 +0100)]
doc: fix rpki ipv4 address family example

Fix RPKI IPv4 address family example.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agodoc: use documentation range in rpki manual
Louis Scalbert [Thu, 18 Jan 2024 10:00:53 +0000 (11:00 +0100)]
doc: use documentation range in rpki manual

Use documentation range in rpki manual

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add vrf name to some rpki logs
Philippe Guibert [Mon, 3 Feb 2020 12:41:09 +0000 (13:41 +0100)]
bgpd: add vrf name to some rpki logs

Add VRF name to some rpki logs

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: set rpki validation state in vrf table
Philippe Guibert [Mon, 3 Feb 2020 12:36:58 +0000 (13:36 +0100)]
bgpd: set rpki validation state in vrf table

Set the RPKI validation state in the VRF BGP table. It allows applying
a route-maps with "match rpki <state>" on a VRF neighbor.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: show per vrf rpki configuration in show run
Philippe Guibert [Thu, 19 Sep 2019 14:37:14 +0000 (16:37 +0200)]
bgpd: show per vrf rpki configuration in show run

Show per VRF RPKI configuration in "show run".

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add support of rpki in vrf configure context
Philippe Guibert [Thu, 19 Sep 2019 12:13:57 +0000 (14:13 +0200)]
bgpd: add support of rpki in vrf configure context

Add support of RPKI commands in the VRF configure context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add support of vrf to rpki in enable mode
Philippe Guibert [Thu, 19 Sep 2019 09:42:46 +0000 (11:42 +0200)]
bgpd: add support of vrf to rpki in enable mode

Add a "vrf <vrfname>" argument to "show rpki" and "rpki" commands in
enable mode

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: create cache server socket in vrf
Philippe Guibert [Tue, 29 Oct 2019 16:56:47 +0000 (17:56 +0100)]
bgpd: create cache server socket in vrf

Create cache server socket in vrf

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: start or stop rpki at vrf creation or deletion
Louis Scalbert [Thu, 21 Dec 2023 10:04:01 +0000 (11:04 +0100)]
bgpd: start or stop rpki at vrf creation or deletion

Start or stop a RPKI cache servers in VRF when they are created or
deleted.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: add a hook to inform a vrf is enabled/disabled
Philippe Guibert [Tue, 29 Oct 2019 16:52:52 +0000 (17:52 +0100)]
bgpd: add a hook to inform a vrf is enabled/disabled

Add a hook to call a future callback function when bgpd knows from zebra
about the activation of de-activation of a VRF. It will be used by the
RPKI module in next commits.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: remove rpki config command from enable node
Philippe Guibert [Thu, 19 Sep 2019 14:41:12 +0000 (16:41 +0200)]
bgpd: remove rpki config command from enable node

Remove rpki config command from enable node. It cannot work.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agobgpd: move rpki variables in a per vrf fist
Philippe Guibert [Wed, 4 Sep 2019 15:51:22 +0000 (17:51 +0200)]
bgpd: move rpki variables in a per vrf fist

RPKI stores its data in global variables. It does not allow specific
date per VRF.

Move global variable to a new structure named rpki_vrf and maintain a
per VRF list of rpki_vrf. The changes are cosmetic because only the
default VRF is supported yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
15 months agoMerge pull request #15166 from LabNConsulting/chopps/fix-munet
Donatas Abraitis [Thu, 18 Jan 2024 07:18:04 +0000 (09:18 +0200)]
Merge pull request #15166 from LabNConsulting/chopps/fix-munet

tests: fix munet accessing missing attribute

15 months agolib,vtysh: add per-daemon log file config
Mark Stapp [Wed, 17 Jan 2024 21:15:07 +0000 (16:15 -0500)]
lib,vtysh: add per-daemon log file config

Add a config that specifies per-deamon log file names.
Move the handy generated list of daemon names from vtysh to lib;
edit the gitignore files to match.

Signed-off-by: Mark Stapp <mjs@labn.net>
15 months agoMerge pull request #15162 from opensourcerouting/fix/aspath4_set_flag
Donald Sharp [Wed, 17 Jan 2024 13:19:34 +0000 (08:19 -0500)]
Merge pull request #15162 from opensourcerouting/fix/aspath4_set_flag

bgpd: Set capability received flag only after sanity checks