Commit Graph

34980 Commits

Author SHA1 Message Date
Donald Sharp
c5ecee63ac
Merge pull request #15517 from idryzhov/fix-yang-notif-actions
lib: fix initialization of northbound nodes
2024-03-11 15:47:17 -04:00
Donald Sharp
c514e84979
Merge pull request #15516 from opensourcerouting/freebsd-printf-sync-20240310
lib/printf: pick up ISO C23 / N2680 from FreeBSD
2024-03-11 10:32:32 -04:00
Donald Sharp
0042ea49b5
Merge pull request #15513 from opensourcerouting/fix/bgp_default_software_version
bgpd: Fix `no` form for `neighbor X capability software-version`
2024-03-11 07:17:09 -04:00
Donald Sharp
1c996aaa75
Merge pull request #15514 from opensourcerouting/fix/bgp_dynamic_capability_handle_unset
bgpd: Unset advertised capabilities if capability is disabled
2024-03-11 07:16:24 -04:00
Igor Ryzhov
fb912e0900 lib: fix initialization of northbound nodes
When actions and notification are defined as descendants of other nodes,
they are not getting initialized, because the iterator skips them. Fix
the iterator to include them when traversing the schema.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-10 20:51:55 +02:00
Donald Sharp
5c30b2e212
Merge pull request #15515 from opensourcerouting/zlog-recirculate-ldpd
ldpd, lib: integrate lde/ldpe into standard logging infrastructure
2024-03-10 13:12:46 -04:00
Donatas Abraitis
fd613d1b0c tests: Check if capabilities can be disabled via dynamic capabilities
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-10 18:53:39 +02:00
Donatas Abraitis
78757362f2 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>
2024-03-10 18:25:30 +02:00
David Lamparter
02af04f73d 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>
2024-03-10 15:29:17 +01:00
David Lamparter
a7ab0c943d 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>
2024-03-10 15:29:17 +01:00
David Lamparter
91fdb7366c tests: exercise %w/%wf printfrr modifiers
Added by ISO C23 / N2680, implementation imported from FreeBSD.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-03-10 15:29:17 +01:00
Dag-Erling Smørgrav
c917023380 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)
2024-03-10 15:29:17 +01:00
David Lamparter
95a737ed1b 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>
2024-03-10 12:42:14 +01:00
David Lamparter
5f16c640c2 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>
2024-03-10 12:42:02 +01:00
Donatas Abraitis
77102e853e 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>
2024-03-09 22:23:37 +02:00
Donatas Abraitis
2038fad33e 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>
2024-03-09 21:52:17 +02:00
Donatas Abraitis
aa6ceeeb5b
Merge pull request #15510 from idryzhov/fix-rip-ripng-rpc
fix rip/ripng yang rpcs
2024-03-09 11:15:20 +01:00
Donatas Abraitis
b4bd6c8557
Merge pull request #15509 from donaldsharp/freebsd_cleanups
pimd: Cleanup inclusion of headers
2024-03-09 08:31:48 +01:00
Igor Ryzhov
c544b9e8e7 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>
2024-03-09 00:01:01 +02:00
Igor Ryzhov
1ba97510e2 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>
2024-03-09 00:00:12 +02:00
Donald Sharp
a5389154a1 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>
2024-03-08 18:04:34 +00:00
Donald Sharp
7e058c201a
Merge pull request #15469 from LabNConsulting/chopps/keychain-yang
add ietf-key-chain YANG module support
2024-03-08 08:15:02 -05:00
Donald Sharp
0d31f63dba
Merge pull request #15497 from idryzhov/show-run-fixes
a couple of fixes for "show running-config"
2024-03-08 08:11:14 -05:00
Donatas Abraitis
10486960b4
Merge pull request #15506 from fdumontet6WIND/local_link
ospf6d: add localLinkLocalAddress field
2024-03-08 08:19:25 +01:00
Francois Dumontet
c1e57dc4bd 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>
2024-03-07 14:33:47 +01:00
Donatas Abraitis
2e840a5339
Merge pull request #15498 from idryzhov/mgmt-change-error
mgmtd: change error message
2024-03-07 08:25:29 +01:00
Igor Ryzhov
bbaf34b117 mgmtd: change error message
Make the wording clearer about what's going on.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-06 23:57:30 +02:00
Igor Ryzhov
1db1fbf7a6 ripngd: fix missing "exit" for "router ripng"
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-06 21:43:44 +02:00
Igor Ryzhov
aaa6c7088e ripd: fix missing "exit" for "router rip"
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-03-06 21:42:53 +02:00
Igor Ryzhov
18da736949 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>
2024-03-06 21:41:35 +02:00
Donatas Abraitis
dfe570e988
Merge pull request #15487 from idryzhov/nb-apply-finish
lib: fix apply_finish callback in northbound
2024-03-06 08:44:09 +02:00
Donatas Abraitis
864844a2e8
Merge pull request #15486 from donaldsharp/make_prefix
bgpd: pi->attr is deref'ed in all paths leading up to test
2024-03-06 08:43:40 +02:00
Donatas Abraitis
bb5a2a9375
Merge pull request #15489 from idryzhov/vty-mgmt-error
vty: change output of errors from mgmtd
2024-03-06 08:43:16 +02:00
Donatas Abraitis
7338aa601c
Merge pull request #15492 from donaldsharp/no_vrfs
tests: test invokes a script which does not exist
2024-03-06 08:42:37 +02:00
Donald Sharp
3a78d75cd5 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>
2024-03-05 15:55:07 -05:00
Donatas Abraitis
ffab0d7fbc
Merge pull request #15222 from chiragshah6/fdev2
bgpd:aggr summary-only remove suppressed from evpn
2024-03-05 22:36:30 +02:00
Russ White
ac34badf71
Merge pull request #15397 from idryzhov/zebra-oper
zebra: oper data additions
2024-03-05 11:41:35 -05:00
Igor Ryzhov
1853ccdb0f 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>
2024-03-05 17:56:21 +02:00
Donald Sharp
a9c16a0a89 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>
2024-03-05 10:37:48 -05:00
Chirag Shah
f345460b7e 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>
2024-03-05 07:03:39 -08:00
Chirag Shah
5cb7712b3e 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>
2024-03-05 07:03:39 -08:00
Russ White
cf4d838e69
Merge pull request #15479 from opensourcerouting/fix/spelling
doc: Fix one spelling `dissallowed` to `disallowed`
2024-03-05 08:48:56 -05:00
Russ White
0bc1c70f65
Merge pull request #15460 from Max-Mustermann33/route-metric-update
ospfd: Send update for route with new metric
2024-03-05 08:45:45 -05:00
Russ White
018fad7806
Merge pull request #15450 from opensourcerouting/fix/coverity
bgpd: Check if attributes exists for the path before checking mp_nexthop_len
2024-03-05 08:43:28 -05:00
Igor Ryzhov
8287fbe453 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>
2024-03-05 15:30:37 +02:00
Donatas Abraitis
fa5acd5a16
Merge pull request #15476 from donaldsharp/dplane_thread_issue_i_believe
zebra: fnc->obuf could be accessed without a lock
2024-03-05 14:53:41 +02:00
Martin Winter
a44918640f
Merge pull request #15369 from donaldsharp/fpm_stub_addition
Add ability to test dplane_fpm_nl.c file
2024-03-05 13:06:42 +01:00
Donatas Abraitis
e993ba1812 doc: Fix one spelling dissallowed to disallowed
Closes: https://github.com/FRRouting/frr/issues/15465

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-03-05 08:57:39 +02:00
Christian Hopps
21aa86319c
Merge pull request #15470 from idryzhov/fix-darr-vsprintf
lib: fix __darr_in_vsprintf
2024-03-04 22:45:02 -05:00
Christian Hopps
f47abbe1cb tests: add test for keychain send-accept times
Also uses oper state `active` node to test.

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-03-04 20:00:15 -05:00