]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
13 months agozebra: Clean up leaked linklist data structure on shutdown
Donald Sharp [Mon, 11 Mar 2024 20:05:56 +0000 (16:05 -0400)]
zebra: Clean up leaked linklist data structure on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agolib: Remove unused memory types
Donald Sharp [Mon, 11 Mar 2024 17:04:09 +0000 (13:04 -0400)]
lib: Remove unused memory types

These are never used.  So let's remove them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #15516 from opensourcerouting/freebsd-printf-sync-20240310
Donald Sharp [Mon, 11 Mar 2024 14:32:32 +0000 (10:32 -0400)]
Merge pull request #15516 from opensourcerouting/freebsd-printf-sync-20240310

lib/printf: pick up ISO C23 / N2680 from FreeBSD

13 months agoMerge pull request #15513 from opensourcerouting/fix/bgp_default_software_version
Donald Sharp [Mon, 11 Mar 2024 11:17:09 +0000 (07:17 -0400)]
Merge pull request #15513 from opensourcerouting/fix/bgp_default_software_version

bgpd: Fix `no` form for `neighbor X capability software-version`

13 months agoMerge pull request #15514 from opensourcerouting/fix/bgp_dynamic_capability_handle_unset
Donald Sharp [Mon, 11 Mar 2024 11:16:24 +0000 (07:16 -0400)]
Merge pull request #15514 from opensourcerouting/fix/bgp_dynamic_capability_handle_unset

bgpd: Unset advertised capabilities if capability is disabled

13 months agoMerge pull request #15515 from opensourcerouting/zlog-recirculate-ldpd
Donald Sharp [Sun, 10 Mar 2024 17:12:46 +0000 (13:12 -0400)]
Merge pull request #15515 from opensourcerouting/zlog-recirculate-ldpd

ldpd, lib: integrate lde/ldpe into standard logging infrastructure

13 months agotests: Check if capabilities can be disabled via dynamic capabilities 15514/head
Donatas Abraitis [Sun, 10 Mar 2024 16:51:05 +0000 (18:51 +0200)]
tests: Check if capabilities can be disabled via dynamic capabilities

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agobgpd: Allow dynamically disable graceful-restart/long-lived graceful-restart
Donatas Abraitis [Sun, 10 Mar 2024 16:25:30 +0000 (18:25 +0200)]
bgpd: Allow dynamically disable graceful-restart/long-lived graceful-restart

If we enter `bgp graceful-restart-disable`, make sure we disable the capabilities.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agodoc: update re. ISO C23 printf changes 15516/head
David Lamparter [Sun, 10 Mar 2024 12:40:19 +0000 (13:40 +0100)]
doc: update re. ISO C23 printf changes

The new `%w99d` fixed-width modifier still needs work in `frr-format`,
which unfortunately is not as trivial as `%b` was.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agolib/printf: update README
David Lamparter [Sun, 10 Mar 2024 12:21:37 +0000 (13:21 +0100)]
lib/printf: update README

Make a note that `%w[f](8|16|32|64)d` was picked up.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agotests: exercise `%w`/`%wf` printfrr modifiers
David Lamparter [Sun, 10 Mar 2024 12:30:46 +0000 (13:30 +0100)]
tests: exercise `%w`/`%wf` printfrr modifiers

Added by ISO C23 / N2680, implementation imported from FreeBSD.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agolib/printf: Implement N2680.
Dag-Erling Smørgrav [Thu, 7 Sep 2023 06:14:44 +0000 (06:14 +0000)]
lib/printf: Implement N2680.

This adds specific width length modifiers in the form of wN and wfN
(where N is 8, 16, 32, or 64) which allow printing intN_t and
int_fastN_t without resorting to casts or PRI macros.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41725

FRR changes only include printf(), scanf/strtol are not locally
implemented in FRR.  Also added "(void) 0" to empty "else ..." to
avoid a compiler warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from FreeBSD commit bce0bef3c6abab92c7ac8cc23b7cc632a382721e)

13 months agoldpd: use zlog recirculation for subprocesses 15515/head
David Lamparter [Thu, 25 Jan 2024 21:54:54 +0000 (22:54 +0100)]
ldpd: use zlog recirculation for subprocesses

This way, full functionality of `zlog_*` is available.

Having `fatal()` be wrappers around `assertf()` also means we get
backtraces, which is not the case for a plain `exit(1)`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agolib: allow recirculating/relaying log messages
David Lamparter [Thu, 25 Jan 2024 21:11:44 +0000 (22:11 +0100)]
lib: allow recirculating/relaying log messages

This is primarily intended for ldpd with its split-process architecture.
The LDE/LDPE subprocesses currently lose the extended zlog
functionality.

The zlog_live target already encapsulates all necessary bits for vtysh.
Reuse it for a relay function to be used in the main ldpd process.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
13 months agobgpd: Unset advertised capabilities if capability is disabled
Donatas Abraitis [Sat, 9 Mar 2024 20:17:27 +0000 (22:17 +0200)]
bgpd: Unset advertised capabilities if capability is disabled

When using dynamic capabilities, do not forget to unset advertised capabilities.

Otherwise, it's kept as advertised.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agobgpd: Fix `no` form for `neighbor X capability software-version` 15513/head
Donatas Abraitis [Sat, 9 Mar 2024 19:52:17 +0000 (21:52 +0200)]
bgpd: Fix `no` form for `neighbor X capability software-version`

If `bgp default software-version-capability` is enabled, allow unsetting this
for a single neighbor also.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #15510 from idryzhov/fix-rip-ripng-rpc
Donatas Abraitis [Sat, 9 Mar 2024 10:15:20 +0000 (11:15 +0100)]
Merge pull request #15510 from idryzhov/fix-rip-ripng-rpc

fix rip/ripng yang rpcs

13 months agoMerge pull request #15509 from donaldsharp/freebsd_cleanups
Donatas Abraitis [Sat, 9 Mar 2024 07:31:48 +0000 (08:31 +0100)]
Merge pull request #15509 from donaldsharp/freebsd_cleanups

pimd: Cleanup inclusion of headers

13 months agoripngd: fix "clear ipv6 ripng" command 15510/head
Igor Ryzhov [Fri, 8 Mar 2024 22:01:01 +0000 (00:01 +0200)]
ripngd: fix "clear ipv6 ripng" command

mgmtd doesn't support YANG RPCs yet, so this command must go directly to
ripngd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoripd: fix "clear ip rip" command
Igor Ryzhov [Fri, 8 Mar 2024 22:00:12 +0000 (00:00 +0200)]
ripd: fix "clear ip rip" command

mgmtd doesn't support YANG RPCs yet, so this command must go directly to
ripd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agopimd: Cleanup inclusion of headers 15509/head
Donald Sharp [Fri, 8 Mar 2024 18:04:34 +0000 (18:04 +0000)]
pimd: Cleanup inclusion of headers

FRR needs to properly include the FreeBSD headers for
compilation on FreeBSD.  I have setup v6 as well
but I have not even tested it.  Since I know
that the form is the same I think this is ok
at the moment.  This is a step forward.

Because of this change *clearly* no-one is even
using pim on FreeBSD.  <look at the MRT_XXX values
to prove to yourself>.  In any event this is a step
in the direction of getting that working again.

Signed-off-by: Donald Sharp <sharpd@freebsd.network>
13 months agoMerge pull request #15469 from LabNConsulting/chopps/keychain-yang
Donald Sharp [Fri, 8 Mar 2024 13:15:02 +0000 (08:15 -0500)]
Merge pull request #15469 from LabNConsulting/chopps/keychain-yang

add ietf-key-chain YANG module support

13 months agoMerge pull request #15497 from idryzhov/show-run-fixes
Donald Sharp [Fri, 8 Mar 2024 13:11:14 +0000 (08:11 -0500)]
Merge pull request #15497 from idryzhov/show-run-fixes

a couple of fixes for "show running-config"

13 months agoMerge pull request #15506 from fdumontet6WIND/local_link
Donatas Abraitis [Fri, 8 Mar 2024 07:19:25 +0000 (08:19 +0100)]
Merge pull request #15506 from fdumontet6WIND/local_link

ospf6d: add localLinkLocalAddress field

13 months agoospf6d: add localLinkLocalAddress field 15506/head
Francois Dumontet [Thu, 7 Mar 2024 13:33:37 +0000 (14:33 +0100)]
ospf6d: add localLinkLocalAddress field

add localIfaceAdress field in show ipv6 ospf6 neighbor detail json
command.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agoMerge pull request #15498 from idryzhov/mgmt-change-error
Donatas Abraitis [Thu, 7 Mar 2024 07:25:29 +0000 (08:25 +0100)]
Merge pull request #15498 from idryzhov/mgmt-change-error

mgmtd: change error message

13 months agomgmtd: change error message 15498/head
Igor Ryzhov [Wed, 6 Mar 2024 21:57:30 +0000 (23:57 +0200)]
mgmtd: change error message

Make the wording clearer about what's going on.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoripngd: fix missing "exit" for "router ripng" 15497/head
Igor Ryzhov [Wed, 6 Mar 2024 19:43:44 +0000 (21:43 +0200)]
ripngd: fix missing "exit" for "router ripng"

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoripd: fix missing "exit" for "router rip"
Igor Ryzhov [Wed, 6 Mar 2024 19:42:53 +0000 (21:42 +0200)]
ripd: fix missing "exit" for "router rip"

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agolib: fix order of interfaces in the config
Igor Ryzhov [Wed, 6 Mar 2024 19:41:35 +0000 (21:41 +0200)]
lib: fix order of interfaces in the config

Add missing cli_cmp callback. Without it, interfaces are not sorted and
printed in order they were created.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoMerge pull request #15487 from idryzhov/nb-apply-finish
Donatas Abraitis [Wed, 6 Mar 2024 06:44:09 +0000 (08:44 +0200)]
Merge pull request #15487 from idryzhov/nb-apply-finish

lib: fix apply_finish callback in northbound

13 months agoMerge pull request #15486 from donaldsharp/make_prefix
Donatas Abraitis [Wed, 6 Mar 2024 06:43:40 +0000 (08:43 +0200)]
Merge pull request #15486 from donaldsharp/make_prefix

bgpd: pi->attr is deref'ed in all paths leading up to test

13 months agoMerge pull request #15489 from idryzhov/vty-mgmt-error
Donatas Abraitis [Wed, 6 Mar 2024 06:43:16 +0000 (08:43 +0200)]
Merge pull request #15489 from idryzhov/vty-mgmt-error

vty: change output of errors from mgmtd

13 months agoMerge pull request #15492 from donaldsharp/no_vrfs
Donatas Abraitis [Wed, 6 Mar 2024 06:42:37 +0000 (08:42 +0200)]
Merge pull request #15492 from donaldsharp/no_vrfs

tests: test invokes a script which does not exist

13 months agotests: test invokes a script which does not exist 15492/head
Donald Sharp [Tue, 5 Mar 2024 20:55:07 +0000 (15:55 -0500)]
tests: test invokes a script which does not exist

Apparently test_bgp_peer_type_multipath_relax.py does
no really need to run a `setup_vrfs` script.  Looking
at the other configuration for this test there are
no vrf's in the frr configuration.  So let's remove it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #15222 from chiragshah6/fdev2
Donatas Abraitis [Tue, 5 Mar 2024 20:36:30 +0000 (22:36 +0200)]
Merge pull request #15222 from chiragshah6/fdev2

bgpd:aggr summary-only remove suppressed from evpn

13 months agoMerge pull request #15397 from idryzhov/zebra-oper
Russ White [Tue, 5 Mar 2024 16:41:35 +0000 (11:41 -0500)]
Merge pull request #15397 from idryzhov/zebra-oper

zebra: oper data additions

13 months agovty: change output of errors from mgmtd 15489/head
Igor Ryzhov [Fri, 1 Mar 2024 11:28:25 +0000 (13:28 +0200)]
vty: change output of errors from mgmtd

Make errors look the same way as in regular non-mgmtd vty. We don't need
to show information about some internal request names.

Before:
```
ERROR: SET_CONFIG request failed, Error: YANG error(s):
 Path: Data location "/frr-affinity-map:lib/affinity-maps/affinity-map[name='a']".
 Error: Unique data leaf(s) "value" not satisfied in "/frr-affinity-map:lib/affinity-maps/affinity-map[name='b']" and "/frr-affinity-map:lib/affinity-maps/affinity-map[name='a']".
```

After:
```
% Configuration failed.

YANG error(s):
 Path: Data location "/frr-affinity-map:lib/affinity-maps/affinity-map[name='b']".
 Error: Unique data leaf(s) "value" not satisfied in "/frr-affinity-map:lib/affinity-maps/affinity-map[name='a']" and "/frr-affinity-map:lib/affinity-maps/affinity-map[name='b']".
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agobgpd: pi->attr is deref'ed in all paths leading up to test 15486/head
Donald Sharp [Tue, 5 Mar 2024 15:37:48 +0000 (10:37 -0500)]
bgpd: pi->attr is deref'ed in all paths leading up to test

In make_prefix, the code checks to see if the pi->attr
is non-NULL.  Since (A) we cannot have a path_info without
an attribute and (B) all paths leading up to the test
in make_prefix already have pi->attr deref'ed and the
code is not crashing we know this is safe to remove.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agotests:add topotest for EVPN aggregate prefix route 15222/head
Chirag Shah [Tue, 5 Mar 2024 04:00:29 +0000 (20:00 -0800)]
tests:add topotest for EVPN aggregate prefix route

Toptotest covers to aggregate EVPN prefix routes.

Testing:

tests/topotests/bgp_evpn_vxlan_svd_topo1$ sudo -E python3 -m pytest -s -vv --cli-on-error
PASSED
test_bgp_evpn_vxlan_svd.py::test_pe_advertise_aggr_evpn_route
--------------------- live log call -------------------------------
2024-03-04 19:59:45,340 INFO: P1: checking if daemons are running
2024-03-04 19:59:45,444 INFO: PE1: checking if daemons are running
2024-03-04 19:59:45,578 INFO: PE2: checking if daemons are running
2024-03-04 19:59:45,680 INFO: host1: checking if daemons are running
2024-03-04 19:59:45,798 INFO: host2: checking if daemons are running
2024-03-04 19:59:45,896 INFO: topo: Checking BGP EVPN route contains non-aggregate prefixes
2024-03-04 19:59:45,992 INFO: topo: Configure BGP aggregate-address summary-only under ipv4-unicast
2024-03-04 19:59:46,120 INFO: topo: Checking BGP EVPN route contains aggregated prefix
PASSED

------- generated xml file: /tmp/topotests/topotests.xml -----
======= 10 passed, 1 skipped in 47.95s =====

Signed-off-by: Chirag Shah <chirag@nvidia.com>
13 months agobgpd:aggr summary-only remove suppressed from evpn
Chirag Shah [Wed, 24 Jan 2024 05:52:34 +0000 (21:52 -0800)]
bgpd:aggr summary-only remove suppressed from evpn

Ticket: #3534718 #3720960
Testing Done:

Config:
router bgp 65564 vrf sym_2
 bgp router-id 27.0.0.9
 !
 address-family ipv4 unicast
  redistribute static
 exit-address-family

vrf sym_2
 vni 8889
 ip route 63.2.1.0/24 blackhole
 ip route 63.2.1.2/32 blackhole
 ip route 63.2.1.3/32 blackhole
exit-vrf

tor-1:# vtysh -c "show bgp l2vpn evpn route" | grep -A3 63.2
*> [5]:[0]:[24]:[63.2.1.0] RD 27.0.0.9:19
                    27.0.0.9 (tor-1)
                                             0         32768 ?
                    ET:8 RT:28:8889 Rmac:44:38:39:ff:ff:29
--
*> [5]:[0]:[32]:[63.2.1.2] RD 27.0.0.9:19
                    27.0.0.9 (tor-1)
                                             0         32768 ?
                    ET:8 RT:28:8889 Rmac:44:38:39:ff:ff:29
*> [5]:[0]:[32]:[63.2.1.3] RD 27.0.0.9:19
                    27.0.0.9 (tor-1)
                                             0         32768 ?
                    ET:8 RT:28:8889 Rmac:44:38:39:ff:ff:29

tor-1(config)# router bgp 65564 vrf sym_2
tor-1(config-router)# address-family ipv4 unicast
tor-1(config-router-af)# aggregate-address 63.2.0.0/16 summary-only
tor-1(config-rou-f)# end

tor-1:# vtysh -c "show bgp l2vpn evpn route" | grep -A3 63.2.1
tor-1:# vtysh -c "show bgp l2vpn evpn route" | grep -A3 63.2
*> [5]:[0]:[16]:[63.2.0.0] RD 27.0.0.9:19
                    27.0.0.9 (tor-1)
                                             0         32768 ?
                    ET:8 RT:28:8889 Rmac:44:38:39:ff:ff:29

Signed-off-by: Chirag Shah <chirag@nvidia.com>
13 months agoMerge pull request #15479 from opensourcerouting/fix/spelling
Russ White [Tue, 5 Mar 2024 13:48:56 +0000 (08:48 -0500)]
Merge pull request #15479 from opensourcerouting/fix/spelling

doc: Fix one spelling `dissallowed` to `disallowed`

13 months agoMerge pull request #15460 from Max-Mustermann33/route-metric-update
Russ White [Tue, 5 Mar 2024 13:45:45 +0000 (08:45 -0500)]
Merge pull request #15460 from Max-Mustermann33/route-metric-update

ospfd: Send update for route with new metric

13 months agoMerge pull request #15450 from opensourcerouting/fix/coverity
Russ White [Tue, 5 Mar 2024 13:43:28 +0000 (08:43 -0500)]
Merge pull request #15450 from opensourcerouting/fix/coverity

bgpd: Check if attributes exists for the path before checking mp_nexthop_len

13 months agolib: fix apply_finish callback in northbound 15487/head
Igor Ryzhov [Tue, 5 Mar 2024 13:30:37 +0000 (15:30 +0200)]
lib: fix apply_finish callback in northbound

When a node is top-level, we shouldn't stop the whole processing, we
should just skip this single node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agoMerge pull request #15476 from donaldsharp/dplane_thread_issue_i_believe
Donatas Abraitis [Tue, 5 Mar 2024 12:53:41 +0000 (14:53 +0200)]
Merge pull request #15476 from donaldsharp/dplane_thread_issue_i_believe

zebra: fnc->obuf could be accessed without a lock

13 months agoMerge pull request #15369 from donaldsharp/fpm_stub_addition
Martin Winter [Tue, 5 Mar 2024 12:06:42 +0000 (13:06 +0100)]
Merge pull request #15369 from donaldsharp/fpm_stub_addition

Add ability to test dplane_fpm_nl.c file

13 months agodoc: Fix one spelling `dissallowed` to `disallowed` 15479/head
Donatas Abraitis [Tue, 5 Mar 2024 06:57:39 +0000 (08:57 +0200)]
doc: Fix one spelling `dissallowed` to `disallowed`

Closes: https://github.com/FRRouting/frr/issues/15465
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
13 months agoMerge pull request #15470 from idryzhov/fix-darr-vsprintf
Christian Hopps [Tue, 5 Mar 2024 03:45:02 +0000 (22:45 -0500)]
Merge pull request #15470 from idryzhov/fix-darr-vsprintf

lib: fix __darr_in_vsprintf

13 months agotests: add test for keychain send-accept times 15469/head
Christian Hopps [Tue, 5 Mar 2024 00:53:39 +0000 (19:53 -0500)]
tests: add test for keychain send-accept times

Also uses oper state `active` node to test.

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agolib: add keychain northbound support
Christian Hopps [Sat, 24 Feb 2024 10:48:40 +0000 (05:48 -0500)]
lib: add keychain northbound support

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agolib: fix infinite loop in __darr_in_vsprintf 15470/head
Igor Ryzhov [Mon, 4 Mar 2024 18:41:41 +0000 (20:41 +0200)]
lib: fix infinite loop in __darr_in_vsprintf

`darr_avail` returns the available capacity excluding the already
existing terminating NULL byte. Take this into account when using
`darr_avail`. Otherwise, if the error length is a power of 2, the
capacity is never enough and the function stucks in an infinite loop.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agozebra: fnc->obuf could be accessed without a lock 15476/head
Donald Sharp [Mon, 4 Mar 2024 23:07:42 +0000 (18:07 -0500)]
zebra: fnc->obuf could be accessed without a lock

Found by coverity.  Let's just lock the writeable
amount to see if it is possible.  It's ok because
we want to know if we have room *now*.  If another
pthread runs it will only remove data from fnc->obuf
and make more room.  So this is ok.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agodebian: Add a frr-test-tools debian package 15369/head
Donald Sharp [Wed, 21 Feb 2024 17:50:13 +0000 (12:50 -0500)]
debian: Add a frr-test-tools debian package

This package will hold test tools that are built and useful for
developers of FRR but not useful for everyday usage of FRR.  This
is separted out because these are useful enough to have in their
own package.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agotests: Add a pytest marker for the fpm
Donald Sharp [Sat, 17 Feb 2024 22:16:29 +0000 (17:16 -0500)]
tests: Add a pytest marker for the fpm

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agotests: Add a very simple test for the dplane_fpm_nl module
Donald Sharp [Wed, 14 Feb 2024 17:45:16 +0000 (12:45 -0500)]
tests: Add a very simple test for the dplane_fpm_nl module

Ensure that the fpm module connects to the specified listener
and then ensure that 10k routes from sharpd are installed
into the system and then are removed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agotests: Add ability to run a fpm listener
Donald Sharp [Wed, 14 Feb 2024 17:41:49 +0000 (12:41 -0500)]
tests: Add ability to run a fpm listener

Add the ability to run a fpm listener to the testing
system.  This is nothing more just allowing the test
system to bring it up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agodoc: Add `show fpm status [json]` command to documentation
Donald Sharp [Wed, 14 Feb 2024 17:17:56 +0000 (12:17 -0500)]
doc: Add `show fpm status [json]` command to documentation

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agozebra: Add `show fpm status [json]` command
Donald Sharp [Wed, 14 Feb 2024 17:15:57 +0000 (12:15 -0500)]
zebra: Add `show fpm status [json]` command

Add a command to get the status of the dplane_fpm_nl
module.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agozebra: Add fpm_listener
Donald Sharp [Wed, 14 Feb 2024 21:07:45 +0000 (16:07 -0500)]
zebra: Add fpm_listener

Add a tiny fpm_listener program to allow FRR to test the
fpm.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agodoc, tools: Remove ARRAY_SIZE check
Donald Sharp [Thu, 15 Feb 2024 15:19:36 +0000 (10:19 -0500)]
doc, tools: Remove ARRAY_SIZE check

checkpatch.pl wants you to use ARRAY_SIZE in a kernel
header file.  We don't have access to this kernel header
file for normal compilation.  I'm just going to remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #15467 from donaldsharp/bgp_best_selection_cleanup
Donatas Abraitis [Mon, 4 Mar 2024 11:35:35 +0000 (13:35 +0200)]
Merge pull request #15467 from donaldsharp/bgp_best_selection_cleanup

Bgp best selection cleanup

13 months agolib: fix __darr_in_vsprintf
Igor Ryzhov [Mon, 5 Feb 2024 17:04:39 +0000 (19:04 +0200)]
lib: fix __darr_in_vsprintf

If the initial darr capacity is not enough for the output, the `ap` is
reused multiple times, which is wrong, because it may be altered by
`vsnprintf`. Make a copy of `ap` each time instead of reusing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
13 months agolib: add automatic xpath-based completion
Christian Hopps [Fri, 1 Mar 2024 13:48:47 +0000 (08:48 -0500)]
lib: add automatic xpath-based completion

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoyang: modify standard model
Christian Hopps [Fri, 1 Mar 2024 11:14:46 +0000 (06:14 -0500)]
yang: modify standard model

We need to operate w/o cryptographic algorithm during key creation
due to how our legacy CLI works (each command issuing a single YANG
modification).

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agoMerge pull request #15448 from louis-6wind/bmp-labels
Donatas Abraitis [Sun, 3 Mar 2024 18:21:17 +0000 (20:21 +0200)]
Merge pull request #15448 from louis-6wind/bmp-labels

bgpd: export labels into BMP

13 months agoMerge pull request #15458 from opensourcerouting/fix/bgpd_send_hold_timer_expired_not...
Donald Sharp [Sun, 3 Mar 2024 02:21:08 +0000 (21:21 -0500)]
Merge pull request #15458 from opensourcerouting/fix/bgpd_send_hold_timer_expired_notification_code

bgpd: Send "Send Hold Timer Expired" on such events notification

13 months agobgpd: Simplify for loop 15467/head
Donald Sharp [Sun, 25 Feb 2024 13:07:21 +0000 (08:07 -0500)]
bgpd: Simplify for loop

This for loop has no chance of removing entries so there is no
need to do a bit of complicated code to handle the case where
an entry can be removed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Allow string creation to handle NULL case
Donald Sharp [Sun, 25 Feb 2024 13:04:15 +0000 (08:04 -0500)]
bgpd: Allow string creation to handle NULL case

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Both possible paths unset a flag, so reduce
Donald Sharp [Sun, 25 Feb 2024 12:59:25 +0000 (07:59 -0500)]
bgpd: Both possible paths unset a flag, so reduce

Both paths through the code unset a flag, so reduce the
duplication.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agobgpd: Testing for valid pointer is done by for loop
Donald Sharp [Sun, 25 Feb 2024 12:52:25 +0000 (07:52 -0500)]
bgpd: Testing for valid pointer is done by for loop

No need to test for valid pointer as that the for loop will
do so as well.  This reduces indentation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
13 months agoMerge pull request #15461 from vjardin/ifdef_warning
Igor Ryzhov [Fri, 1 Mar 2024 21:12:03 +0000 (23:12 +0200)]
Merge pull request #15461 from vjardin/ifdef_warning

fix warning if ripngd disabled

13 months agoyang: Add initial model and generated code.
Christian Hopps [Sun, 25 Feb 2024 10:56:45 +0000 (05:56 -0500)]
yang: Add initial model and generated code.

Signed-off-by: Christian Hopps <chopps@labn.net>
13 months agomgmtd: fix warning if ripngd disabled 15461/head
Vincent JARDIN [Fri, 1 Mar 2024 16:27:53 +0000 (17:27 +0100)]
mgmtd: fix warning if ripngd disabled

./configure [...] --disable-ripngd

could lead to:

mgmtd/mgmt_vty.c:614:5: warning: "HAVE_RIPNGD" is not defined, evaluates to 0 [-Wundef]
  614 | #if HAVE_RIPNGD
      |     ^~~~~~~~~~~

Signed-off-by: Vincent Jardin <vjardin@free.fr>
13 months agoMerge pull request #15449 from sri-mohan1/srib-24-zebra
Mark Stapp [Fri, 1 Mar 2024 14:22:40 +0000 (09:22 -0500)]
Merge pull request #15449 from sri-mohan1/srib-24-zebra

zebra: changes for code maintainability

13 months agoospfd: Send update for route with new metric 15460/head
Alexander Rose [Fri, 1 Mar 2024 12:02:02 +0000 (13:02 +0100)]
ospfd: Send update for route with new metric

When an AS-external-route is deleted on our system and later added again
with a new metric, then the ospfd would first send a LS-update to remove
the old route and later another LS-update to add the route with the new
metric again.
But when this metric-change happens with no time inbetween the ospfd
recognizes this as the same route and does not send any LS-update.
With the change made here, the ospfd will interpret this route as a
different route, when the metric has changed.

Signed-off-by: Alexander Rose <alexander.rose@secunet.com>
13 months agotopotests: apply black on bmp collector 15448/head
Louis Scalbert [Thu, 29 Feb 2024 15:53:32 +0000 (16:53 +0100)]
topotests: apply black on bmp collector

Apply black on bmp collector

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agotopotests: bgp_bmp, test presence of labels
Louis Scalbert [Tue, 27 Feb 2024 18:05:36 +0000 (19:05 +0100)]
topotests: bgp_bmp, test presence of labels

Test the presence of labels in BMP

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agobgpd: add labeled vpn bmp monitoring support
Farid Mihoub [Thu, 1 Jun 2023 12:40:40 +0000 (14:40 +0200)]
bgpd: add labeled vpn bmp monitoring support

Support BMP monitoring for the BGP labeled VPN prefixes.

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agotopotests: bgp_bmp, log bmp into tgen logdir
Louis Scalbert [Tue, 27 Feb 2024 17:29:09 +0000 (18:29 +0100)]
topotests: bgp_bmp, log bmp into tgen logdir

Log BMP into tgen logdir to facilitate the debug.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agotopotests: bgp_bmp, add vpn tests
Louis Scalbert [Tue, 27 Feb 2024 14:42:16 +0000 (15:42 +0100)]
topotests: bgp_bmp, add vpn tests

Test vpn prefixes sending to BMP

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agotopotests: bgp_bmp, use test ip range
Louis Scalbert [Tue, 27 Feb 2024 13:40:57 +0000 (14:40 +0100)]
topotests: bgp_bmp, use test ip range

Use standard test ip range in bgp_bmp topotest

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
13 months agobgpd: Send "Send Hold Timer Expired" on such events notification 15458/head
Donatas Abraitis [Thu, 29 Feb 2024 13:37:53 +0000 (15:37 +0200)]
bgpd: Send "Send Hold Timer Expired" on such events notification

This is required by the current (latest/-02 draft).

IANA has registered code 8 for "Send Hold Timer Expired" in the "BGP
Error (Notification) Codes" sub-registry under the "Border Gateway
Protocol (BGP) Parameters" registry.

https://datatracker.ietf.org/doc/html/draft-ietf-idr-bgp-sendholdtimer

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
14 months agoMerge pull request #14775 from adrianomarto/test_ospfd_single_switch2
Donatas Abraitis [Thu, 29 Feb 2024 08:36:54 +0000 (10:36 +0200)]
Merge pull request #14775 from adrianomarto/test_ospfd_single_switch2

tests: multiple OSPF routers connected to a single switch

14 months agoMerge pull request #14898 from chiragshah6/mdev
Donatas Abraitis [Thu, 29 Feb 2024 07:26:13 +0000 (09:26 +0200)]
Merge pull request #14898 from chiragshah6/mdev

tools: fix frr-reload for nbr deletion

14 months agoMerge pull request #15368 from louis-6wind/fix-6pe
Donatas Abraitis [Wed, 28 Feb 2024 09:34:43 +0000 (11:34 +0200)]
Merge pull request #15368 from louis-6wind/fix-6pe

bgpd: fix 6vpe nexthop

14 months agoMerge pull request #15446 from mjstapp/fix_config_typo
Donatas Abraitis [Wed, 28 Feb 2024 09:34:06 +0000 (11:34 +0200)]
Merge pull request #15446 from mjstapp/fix_config_typo

tools: fix typo in configure script

14 months agoMerge pull request #15447 from louis-6wind/bmp-safi
Donatas Abraitis [Wed, 28 Feb 2024 09:33:35 +0000 (11:33 +0200)]
Merge pull request #15447 from louis-6wind/bmp-safi

bmp: fix vty_out for monitor afi loc-rib

14 months agozebra: changes for code maintainability 15449/head
sri-mohan1 [Wed, 28 Feb 2024 04:45:06 +0000 (10:15 +0530)]
zebra: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
14 months agobgpd: Check if attributes exists for the path before checking mp_nexthop_len 15450/head
Donatas Abraitis [Wed, 28 Feb 2024 06:26:25 +0000 (08:26 +0200)]
bgpd: Check if attributes exists for the path before checking mp_nexthop_len

CID: 1583901

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
14 months agobmp: fix vty_out for monitor afi loc-rib 15447/head
Farid Mihoub [Thu, 8 Jun 2023 13:37:10 +0000 (15:37 +0200)]
bmp: fix vty_out for monitor afi loc-rib

"show run" displays BMP monitor AFI in upper case.

> bmp targets bmp1
>  bmp monitor IPv4 unicast loc-rib

Display it in lower case.

> bmp targets bmp1
>  bmp monitor ipv4 unicast loc-rib

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
14 months agotools: fix typo in configure script 15446/head
Mark Stapp [Tue, 27 Feb 2024 17:36:38 +0000 (12:36 -0500)]
tools: fix typo in configure script

Fix a small typo nit in the configure script.

Signed-off-by: Mark Stapp <mjs@cisco.com>
14 months agoMerge pull request #13721 from pguibert6WIND/route_target_wrong_display
Russ White [Tue, 27 Feb 2024 17:01:45 +0000 (12:01 -0500)]
Merge pull request #13721 from pguibert6WIND/route_target_wrong_display

bgpd: fix route-target display with as dotted format

14 months agoMerge pull request #15438 from opensourcerouting/fix/doc_release_reference_table
Russ White [Tue, 27 Feb 2024 17:01:29 +0000 (12:01 -0500)]
Merge pull request #15438 from opensourcerouting/fix/doc_release_reference_table

doc: Update dates in release reference table

14 months agoMerge pull request #15399 from louis-6wind/fix-macvlan-crash
Donatas Abraitis [Tue, 27 Feb 2024 16:31:28 +0000 (18:31 +0200)]
Merge pull request #15399 from louis-6wind/fix-macvlan-crash

zebra: fix crash when macvlan link-interface is in another netns

14 months agoMerge pull request #15431 from Orange-OpenSource/ospf-te
Donatas Abraitis [Tue, 27 Feb 2024 15:41:19 +0000 (17:41 +0200)]
Merge pull request #15431 from Orange-OpenSource/ospf-te

ospfd: Solved crash in OSPF TE parsing

14 months agoMerge pull request #14810 from dmytroshytyi-6WIND/srv6_bgp_sid_reachability
Russ White [Tue, 27 Feb 2024 15:32:14 +0000 (10:32 -0500)]
Merge pull request #14810 from dmytroshytyi-6WIND/srv6_bgp_sid_reachability

SRv6 BGP SID reachability

14 months agoMerge pull request #15273 from opensourcerouting/feature/paths_limit_capability
Russ White [Tue, 27 Feb 2024 15:24:05 +0000 (10:24 -0500)]
Merge pull request #15273 from opensourcerouting/feature/paths_limit_capability

bgpd: Implement Paths-Limit capability

14 months agobgpd: fix route-target display with as dotted format 13721/head
Philippe Guibert [Wed, 7 Jun 2023 15:26:52 +0000 (17:26 +0200)]
bgpd: fix route-target display with as dotted format

The following command results in a wrong route-target
display:
> # show running-config
> [..]
> route-map rmap permit 1
>  set extcommunity rt 1.45:55
> exit
> router bgp 1.45 as-notation plain
> neighbor 192.0.2.1 remote-as 65500
> address-family ipv4 unicast
> network 192.0.2.2/32 route-map rmap
>

Observed output:

> # show bgp ipv4 192.0.2.2/32
> [..]
>     Extended Community: RT:1.0.0.45:55
>

The decoding of the passed cli string assumes this is an
IP address, whereas it is an AS number in dotted format.
Consequently, the vty output will use the ip address encoding.

Count the number of dots in the extended community format.
If a single dot number is detected, the AS format is passed,
and used by the vty output.

After fix:

>
> # show bgp ipv4 192.0.2.2/32
> [..]
>    Extended Community: RT:65581:55
>

For remind, AS 65581 and AS 1.45 are a unique AS number.

> show bgp neighbor
> BGP neighbor is 192.0.2.1, remote AS 65500, local AS 65581, external link
> [..]

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
14 months agodoc: Update dates in release reference table 15438/head
Donatas Abraitis [Tue, 27 Feb 2024 12:54:16 +0000 (14:54 +0200)]
doc: Update dates in release reference table

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>