bgpd: Add more connection direction debuggingWhen debugging issues having a bit more data about the connection
direction in some situations would be useful.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
doc: document requirement for python libyang < verison 4.Version 4 release is anticipated and won't be compatible with v3
Signed-off-by: Christian Hopps <chopps@labn.net>
tests: allow adding daemons to inferred from frr.conf- Allow pasing daemon name strings rather than RD_X value
- Allow just passing a daemon name string instead of a tuple of daemon and
param.
Signed-off-by: Christian Hopps <chopps@labn.net>
tests: mgmt_oper: add missing combinations and missing gen scriptAdd missing generating script lines as well as some missing combinations
of the commands (was actually missing a bug found in interface queries).
These generic interface queries needed a new filter (clean_json()) to remove
some auto-created linux interfaces that exist on some systems and not
others (e.g., gre0, gretap0, erspan0 when gre kernel module is loaded) to keep
from failing sometimes.
...
tests: don't access event struct in grpc unit testUse an api instead of direct struct access in the GRPC
unit-test: the struct is opaque now.
Signed-off-by: Mark Stapp <mjs@cisco.com>
build: make `strlcpy` and co. decls C++ compatibleNeed an `extern "C"` on these so C++ links to the correct symbols.
Fixes: FRRouting/frr#20199
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
build: don't try no_sanitize on variables on GCCGCC doesn't support `__attribute__((no_sanitize))` on variables, only on
functions. And it has started warning about it. Do it only on clang,
shut up the warning.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib: don't override inet_ntop on glibc >= 2.41For one, it collides with `_FORTIFY_SOURCE` on 2.41+, giving very
strange compile errors. But for another, the performance issues with
inet_ntop were actually fixed upstream.
References: https://sourceware.org/git/?p=glibc.git;a=commit;h=090dfa40a5e46f7c0e4d6e8369bcbbd51267625f
References: https://sourceware.org/git/?p=glibc.git;a=commit;h=80f389ed7e684582439629b264c22a84c26bfd8e
Signed-off-b...
Merge pull request #20223 from opensourcerouting/fix/bfd_hold_time_expire_configuredbgpd: Start BFD hold timer ONLY if hold-time is configured (not zero)
lib: northbound: fix coverity #1667734Check the return value of the allocation function as we do elsewhere.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: fix some issue with lttng tracingFix some issues with lttng tracing: hand event loop name as a
string, disable a format-string gcc warning in the logging
code.
Signed-off-by: Mark Stapp <mjs@cisco.com>
lib: Print identity for log facilityInstead of printing ietf-syslog-types:local5, we should print only local5
Fixes: f90bd85 ("lib: logging: split up files for conversion to nb")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Start BFD hold timer ONLY if hold-time is configured (not zero)The issue is that this hold timer is triggered always if hold time is not configured.
We should trigger it ONLY if it's configured and not ZERO.
Fixes: 04e0140 ("bgpd: Add Hold Time(r) for BFD strict mode")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Set strict mode flag when we configure BFD hold-timerhold-timer is a part of BFD strict mode, but we missed setting the flag, and
as a result we don't see "neighbor X bfd strict hold-time Y" in show running.
Fixes: 04e0140c22622085927b7db44c7d8e0ed0735aff ("bgpd: Add Hold Time(r) for BFD strict mode")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
lib: in event lib replace array of regular fds with listReplace the fixed-size array of regular file fds with a
list. This simplifies the management of the fds, and avoids
some potentially costly searching and memmove'ing.
Signed-off-by: Mark Stapp <mjs@cisco.com>
tests: unit-test: add rpc to test modulePreviously was only testing an action. Add RPC w/o args and w/ args to unit
tests.
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd: fix coverity #1667683Coverity traces the free into txn_req_free() but fails to also understand the
TAILQ_REMOVE() in that function, so it thinks we are freeing the same
`tqh_first` element over and over again. :(
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: fix coverity #1644729Check the `transaction->config` non-NULL prior to passing `transaction` to
`nb_db_transaction_save()` as it assumes `config` is non-NULL.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib: fix coverity #1641463Use asserts and casts to inform SA to clear warning. Document valid return
values as well.
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd: fix coverity #1667704Was calling strerror() with negative errno value. It's always just none or
-EBUSY so just elide this altogether.
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd: add restconf flag to RPC APIsFor RPCs, RESTCONF uses a different input/output data format. This needs to be
flagged when calling libyang functions etc, so pass a restconf bool around to
identify when this is the case.
Signed-off-by: Christian Hopps <chopps@labn.net>
docker: build/install latest libyang3 in ubuntu test container- The upstream has moved to version 4. Let's update to the latest V3 for now.
Signed-off-by: Christian Hopps <chopps@labn.net>
lib,bgpd,pathd: move frrevent internals into event moduleMove the core frrevent structs out of the public header file
and into the event lib module. Add a couple of accessor or
helper functions for internal fields; replace direct use of
the structs' fields with the new helper functions.
Signed-off-by: Mark Stapp <mjs@cisco.com>