]>
git.puffer.fish Git - matthieu/frr.git/log
Chirag Shah [Wed, 30 Aug 2023 17:57:25 +0000 (10:57 -0700)]
tools: fix frr-reload for nbr deletion
bgp neighbor config can have multiple lines, if neighbor is
deleted via frr-reload, no neighbor remote-as <> wipes out
the neighbor, subsequent neighbor associated config deletion
would throw generic error.
Frr-reload needs to move neighbor remote-as line to end and allow
all other config lines to be removed.
Ticket:#
3588361 #
3589216
Testing Done:
config:
neighbor swp3 interface remote-as external
neighbor swp3 bfd 3 300 300
neighbor swp3 password leaf11-spine
INFO: Executed "router bgp 65101 no neighbor swp3 interface remote-as external"
INFO: Failed to execute router bgp 65101 no neighbor swp3 bfd 3 300 300
INFO: Failed to execute router bgp 65101 no neighbor swp3 bfd 3 300
INFO: Failed to execute router bgp 65101 no neighbor swp3 bfd 3
INFO: Failed to execute router bgp 65101 no neighbor swp3 bfd
INFO: Failed to execute router bgp 65101 no neighbor swp3
INFO: Failed to execute router bgp 65101 no neighbor
INFO: Failed to execute router bgp 65101 no
ERROR: "router bgp 65101 -- no" we failed to remove this command
ERROR: % Specify remote-as or peer-group commands first
INFO: Failed to execute router bgp 65101 no neighbor swp3 password leaf11-spine
INFO: Failed to execute router bgp 65101 no neighbor swp3 password
INFO: Failed to execute router bgp 65101 no neighbor swp3
INFO: Failed to execute router bgp 65101 no neighbor
INFO: Failed to execute router bgp 65101 no
ERROR: "router bgp 65101 -- no" we failed to remove this command
ERROR: % Specify remote-as or peer-group commands first
After fix:
move the neighbor remote-as deletion line to end which allows to remove
other neighbor associated lines to be deleted.
router bgp 65101 no neighbor swp3 interface remote-as external
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Donatas Abraitis [Sat, 6 Jan 2024 11:20:19 +0000 (13:20 +0200)]
Merge pull request #15054 from k0ste/help
redhat: rpm spec: added protobuf-c to deps & fix bogus changelog date
Christian Hopps [Fri, 5 Jan 2024 14:40:56 +0000 (09:40 -0500)]
Merge pull request #15092 from donaldsharp/lib_zebra_h_cleanup
Lib zebra h cleanup
Donald Sharp [Fri, 5 Jan 2024 14:28:27 +0000 (09:28 -0500)]
Merge pull request #15085 from LabNConsulting/chopps/mgmtd-doc-update
doc: add diagram of oper-state queries.
Donald Sharp [Fri, 5 Jan 2024 14:27:53 +0000 (09:27 -0500)]
Merge pull request #15087 from cscarpitta/fix/fix-cid-
1575079
zebra: Fix coverity issue in `dplane_srv6_encap_srcaddr_set`
Donald Sharp [Fri, 5 Jan 2024 14:27:33 +0000 (09:27 -0500)]
Merge pull request #15089 from pguibert6WIND/asan_sharpd_fix
lib: fix memory leak when disabling nexthop_hold contexts
Donald Sharp [Fri, 5 Jan 2024 14:26:50 +0000 (09:26 -0500)]
Merge pull request #15091 from louis-6wind/fix-ecommunity_fill_pbr_action
bgpd: fix ecommunity_fill_pbr_action heap-buffer-overflow
Donald Sharp [Fri, 5 Jan 2024 14:25:41 +0000 (09:25 -0500)]
Merge pull request #15097 from louis-6wind/cleanup_vrf_update
lib: remove zebra_interface_vrf_update_read()
Donald Sharp [Fri, 5 Jan 2024 14:24:23 +0000 (09:24 -0500)]
Merge pull request #15086 from LabNConsulting/chopps/remove-old-oper-iter-code
lib: remove unused/replaced oper-state iteration code
Donald Sharp [Fri, 5 Jan 2024 14:23:39 +0000 (09:23 -0500)]
Merge pull request #15095 from LabNConsulting/chopps/fix-centos-warn
lib: fix initializer warning on centos 7.
Louis Scalbert [Fri, 5 Jan 2024 10:08:55 +0000 (11:08 +0100)]
lib: remove zebra_interface_vrf_update_read()
zebra_interface_vrf_update_read is orphan. Remove it.
Fixes: b580c52698 ("*: remove ZEBRA_INTERFACE_VRF_UPDATE")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Christian Hopps [Fri, 5 Jan 2024 06:45:34 +0000 (06:45 +0000)]
lib: fix initializer warning on centos 7.
Signed-off-by: Christian Hopps <chopps@labn.net>
Donald Sharp [Thu, 4 Jan 2024 19:53:10 +0000 (14:53 -0500)]
lib: sys/utsname.h is not needed in zebra.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:52:12 +0000 (14:52 -0500)]
lib: zebra.h does not need to include syslog.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:50:23 +0000 (14:50 -0500)]
*: sys/uio.h does not need to be in zebra.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:43:46 +0000 (14:43 -0500)]
lib, sharpd: Move sys/resource.h to where it is used
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:42:17 +0000 (14:42 -0500)]
*: Remove sys/ioctl.h from zebra.h
Practically no-one uses this and ioctls are pretty much
wrappered. Further wrappering could make this even better.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:34:14 +0000 (14:34 -0500)]
lib, vtysh: Remove inclusion of grp.h for everyone
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:32:32 +0000 (14:32 -0500)]
lib: Remove in_systm.h it is never used
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:26:33 +0000 (14:26 -0500)]
*: Remove cost of including netinet/icmp.h everywhere
This file inclusion is only used in 3 places move
the includes to those spots.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:24:01 +0000 (14:24 -0500)]
lib: Remove inclusion of various MAXINT from zebra.h
All modern systems should have these defined. Let's stop
paying the cost of this compilation.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:20:40 +0000 (14:20 -0500)]
lib: HAVE_GLIBC_BACKTRACE does not belong in zebra.h
The backtrace functionality has been abstracted over
to zlog_backtrace(). Now that every place uses this
move the inclusion for HAVE_GLIBC_BACKTRACE into
the appropriate files instead of having everyone
pay for this costly include.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:18:16 +0000 (14:18 -0500)]
bgpd: rfapi was not using internal zlog_backtrace()
The rfapi code was not using the zlog_backtrace()
functionality. Let's just convert over to using
the proper functionality that we have built in now.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:04:36 +0000 (14:04 -0500)]
lib: Move some priviledge headers to file they are used.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 19:02:34 +0000 (14:02 -0500)]
*: Remove Crypto openSSL define from zebra.h
Only a couple of places use this. Move these to a better
spot.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 18:55:09 +0000 (13:55 -0500)]
lib: Breakout sendmmsg into it's own header
The only 2 places sendmmsg is used is in zlog_5424.c
and zlog_live.c. Why is the rest of the entire system
paying for this compilation?
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 4 Jan 2024 18:01:21 +0000 (13:01 -0500)]
Merge pull request #15083 from louis-6wind/fix-isis_spftree_del
isisd: fix _isis_spftree_del heap-use-after-free
Louis Scalbert [Thu, 4 Jan 2024 16:17:47 +0000 (17:17 +0100)]
bgpd: fix ecommunity_fill_pbr_action heap-buffer-overflow
Fix the following heap-buffer-overflow:
> ==
3901635 ==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020003a5940 at pc 0x56260067bb48 bp 0x7ffe8a4f3840 sp 0x7ffe8a4f3838
> READ of size 4 at 0x6020003a5940 thread T0
> #0 0x56260067bb47 in ecommunity_fill_pbr_action bgpd/bgp_ecommunity.c:1587
> #1 0x5626007a246e in bgp_pbr_build_and_validate_entry bgpd/bgp_pbr.c:939
> #2 0x5626007b25e6 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2933
> #3 0x562600909d18 in bgp_zebra_announce bgpd/bgp_zebra.c:1351
> #4 0x5626007d5efd in bgp_process_main_one bgpd/bgp_route.c:3528
> #5 0x5626007d6b43 in bgp_process_wq bgpd/bgp_route.c:3641
> #6 0x7f450f34c2cc in work_queue_run lib/workqueue.c:266
> #7 0x7f450f327a27 in event_call lib/event.c:1970
> #8 0x7f450f21a637 in frr_run lib/libfrr.c:1213
> #9 0x56260062fc04 in main bgpd/bgp_main.c:540
> #10 0x7f450ee2dd09 in __libc_start_main ../csu/libc-start.c:308
> #11 0x56260062ca29 in _start (/usr/lib/frr/bgpd+0x2e3a29)
>
> 0x6020003a5940 is located 0 bytes to the right of 16-byte region [0x6020003a5930,0x6020003a5940)
> allocated by thread T0 here:
> #0 0x7f450f6aa1f8 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
> #1 0x7f450f244f8a in qrealloc lib/memory.c:112
> #2 0x562600673313 in ecommunity_add_val_internal bgpd/bgp_ecommunity.c:143
> #3 0x5626006735bc in ecommunity_uniq_sort_internal bgpd/bgp_ecommunity.c:193
> #4 0x5626006737e3 in ecommunity_parse_internal bgpd/bgp_ecommunity.c:228
> #5 0x562600673890 in ecommunity_parse bgpd/bgp_ecommunity.c:236
> #6 0x562600640469 in bgp_attr_ext_communities bgpd/bgp_attr.c:2674
> #7 0x562600646eb3 in bgp_attr_parse bgpd/bgp_attr.c:3893
> #8 0x562600791b7e in bgp_update_receive bgpd/bgp_packet.c:2141
> #9 0x56260079ba6b in bgp_process_packet bgpd/bgp_packet.c:3406
> #10 0x7f450f327a27 in event_call lib/event.c:1970
> #11 0x7f450f21a637 in frr_run lib/libfrr.c:1213
> #12 0x56260062fc04 in main bgpd/bgp_main.c:540
> #13 0x7f450ee2dd09 in __libc_start_main ../csu/libc-start.c:308
Fixes: dacf6ec120 ("bgpd: utility routine to convert flowspec actions into pbr actions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Philippe Guibert [Wed, 6 Dec 2023 17:34:02 +0000 (18:34 +0100)]
lib: fix memory leak when disabling nexthop_hold contexts
A memory leak is detected when stopping the sharpd daemon
with a nexthop group configuration that includes nexthops.
The nexthop_hold structure and its attributes are not
freed. Fix it by adding the missing free function.
Fixes: 98cbbaea91f6 ("lib: Handle if up/down and vrf enable/disable events")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Carmine Scarpitta [Thu, 4 Jan 2024 10:10:20 +0000 (11:10 +0100)]
zebra: `ctx` has to be non NULL at this point
Fix the following coverity issue:
*** CID
1575079 : Null pointer dereferences (REVERSE_INULL)
/zebra/zebra_dplane.c: 5950 in dplane_srv6_encap_srcaddr_set()
5944 if (ret == AOK)
5945 result = ZEBRA_DPLANE_REQUEST_QUEUED;
5946 else {
5947 atomic_fetch_add_explicit(&zdplane_info
5948 .dg_srv6_encap_srcaddr_set_errors,
5949 1, memory_order_relaxed);
CID
1575079 : Null pointer dereferences (REVERSE_INULL)
Null-checking "ctx" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
5950 if (ctx)
5951 dplane_ctx_free(&ctx);
5952 }
5953 return result;
5954 }
5955
Remove the pointer check for `ctx`. At this point in the
function it has to be non null since we deref'ed it.
Additionally the alloc function that creates it cannot
fail.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Christian Hopps [Thu, 4 Jan 2024 06:33:04 +0000 (06:33 +0000)]
lib: remove unused/replaced oper-state iteration code
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Thu, 4 Jan 2024 05:36:14 +0000 (05:36 +0000)]
doc: add diagram of oper-state queries.
Signed-off-by: Christian Hopps <chopps@labn.net>
Louis Scalbert [Wed, 3 Jan 2024 15:13:02 +0000 (16:13 +0100)]
isisd: fix _isis_spftree_del heap-use-after-free
Fix the following heap-use-after-free
> ==82961==ERROR: AddressSanitizer: heap-use-after-free on address 0x6020001e4750 at pc 0x55a8cc7f63ac bp 0x7ffd6948e340 sp 0x7ffd6948e330
> READ of size 8 at 0x6020001e4750 thread T0
> #0 0x55a8cc7f63ab in isis_route_node_cleanup isisd/isis_route.c:335
> #1 0x7ff25ec617c1 in route_node_free lib/table.c:75
> #2 0x7ff25ec619fc in route_table_free lib/table.c:111
> #3 0x7ff25ec61661 in route_table_finish lib/table.c:46
> #4 0x55a8cc800d83 in _isis_spftree_del isisd/isis_spf.c:397
> #5 0x55a8cc800e45 in isis_spftree_clear isisd/isis_spf.c:414
> #6 0x55a8cc80bd9a in isis_run_spf isisd/isis_spf.c:2020
> #7 0x55a8cc80c370 in isis_run_spf_with_protection isisd/isis_spf.c:2076
> #8 0x55a8cc80cf52 in isis_run_spf_cb isisd/isis_spf.c:2165
> #9 0x7ff25ec7c4dc in event_call lib/event.c:1970
> #10 0x7ff25eb64423 in frr_run lib/libfrr.c:1213
> #11 0x55a8cc7799da in main isisd/isis_main.c:318
> #12 0x7ff25e623d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
> #13 0x7ff25e623e3f in __libc_start_main_impl ../csu/libc-start.c:392
> #14 0x55a8cc778e44 in _start (/usr/lib/frr/isisd+0x109e44)
>
> 0x6020001e4750 is located 0 bytes inside of 16-byte region [0x6020001e4750,0x6020001e4760)
> freed by thread T0 here:
> #0 0x7ff25f000537 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127
> #1 0x7ff25eb9012e in qfree lib/memory.c:130
> #2 0x55a8cc7f6485 in isis_route_table_info_free isisd/isis_route.c:351
> #3 0x55a8cc800cf4 in _isis_spftree_del isisd/isis_spf.c:395
> #4 0x55a8cc800e45 in isis_spftree_clear isisd/isis_spf.c:414
> #5 0x55a8cc80bd9a in isis_run_spf isisd/isis_spf.c:2020
> #6 0x55a8cc80c370 in isis_run_spf_with_protection isisd/isis_spf.c:2076
> #7 0x55a8cc80cf52 in isis_run_spf_cb isisd/isis_spf.c:2165
> #8 0x7ff25ec7c4dc in event_call lib/event.c:1970
> #9 0x7ff25eb64423 in frr_run lib/libfrr.c:1213
> #10 0x55a8cc7799da in main isisd/isis_main.c:318
> #11 0x7ff25e623d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>
> previously allocated by thread T0 here:
> #0 0x7ff25f000a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
> #1 0x7ff25eb8ffdc in qcalloc lib/memory.c:105
> #2 0x55a8cc7f63eb in isis_route_table_info_alloc isisd/isis_route.c:343
> #3 0x55a8cc80052a in _isis_spftree_init isisd/isis_spf.c:334
> #4 0x55a8cc800e51 in isis_spftree_clear isisd/isis_spf.c:415
> #5 0x55a8cc80bd9a in isis_run_spf isisd/isis_spf.c:2020
> #6 0x55a8cc80c370 in isis_run_spf_with_protection isisd/isis_spf.c:2076
> #7 0x55a8cc80cf52 in isis_run_spf_cb isisd/isis_spf.c:2165
> #8 0x7ff25ec7c4dc in event_call lib/event.c:1970
> #9 0x7ff25eb64423 in frr_run lib/libfrr.c:1213
> #10 0x55a8cc7799da in main isisd/isis_main.c:318
> #11 0x7ff25e623d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Fixes: 7153c3cabf ("isisd: update struct isis_route_info has multiple sr info by algorithm")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Russ White [Tue, 2 Jan 2024 22:22:11 +0000 (17:22 -0500)]
Merge pull request #15074 from chiragshah6/fdev4
bgpd: unimport evpn routes when implicit withdraw
Russ White [Tue, 2 Jan 2024 15:42:08 +0000 (10:42 -0500)]
Merge pull request #15055 from opensourcerouting/fix/zebra_ipv6_ll_configured
zebra: Push all configured IP addresses when the interface comes up
Donald Sharp [Tue, 2 Jan 2024 15:38:34 +0000 (10:38 -0500)]
Merge pull request #15062 from opensourcerouting/fix/mark_as_failed_if_do_not_merge_labeled
github: Mark the build as failed if 'do not merge' label is set
Russ White [Tue, 2 Jan 2024 15:37:34 +0000 (10:37 -0500)]
Merge pull request #12261 from cscarpitta/srv6-encap-src-addr
zebra: Add the support of the Source Addr param of the SRv6 Encapsulation
Donald Sharp [Tue, 2 Jan 2024 15:09:03 +0000 (10:09 -0500)]
Merge pull request #15070 from LabNConsulting/chopps/fix-coverity-errors
chopps/fix coverity errors
Donald Sharp [Tue, 2 Jan 2024 15:07:10 +0000 (10:07 -0500)]
Merge pull request #15071 from LabNConsulting/chopps/building-cleanup
build: protobuf is required so update building docs
Donald Sharp [Tue, 2 Jan 2024 15:06:22 +0000 (10:06 -0500)]
Merge pull request #15073 from LabNConsulting/chopps/fix-yang-key-queries
lib: fix specific entry queries
Donald Sharp [Tue, 2 Jan 2024 15:05:16 +0000 (10:05 -0500)]
Merge pull request #15076 from LabNConsulting/chopps/libyang-no-schema-node-key-guarantee
lib: don't count on scheme key nodes being first children
Donald Sharp [Tue, 2 Jan 2024 15:04:40 +0000 (10:04 -0500)]
Merge pull request #15075 from pguibert6WIND/pathd_metric_computed
pathd: add dynamic candidate path metric [computed] keyword
Christian Hopps [Tue, 2 Jan 2024 11:34:34 +0000 (11:34 +0000)]
lib: don't count on scheme key nodes being first children
Heard back from libyang folks that this is not something they consider part of
the API and/or are going to guarantee. So we cannot count on it. Expect keys at
any location on the child sibling list.
Signed-off-by: Christian Hopps <chopps@labn.net>
Philippe Guibert [Tue, 2 Jan 2024 10:49:57 +0000 (11:49 +0100)]
pathd: add dynamic candidate path metric [computed] keyword
Add the 'computed' keyword for a given metric.
> [..]
> metric te computed
When set by the PCC, the PCE must send back a computed metric
value in the PCResponse value.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Christian Hopps [Mon, 1 Jan 2024 09:04:19 +0000 (09:04 +0000)]
lib: fix specific entry queries
- fix key leaf queries
- fix specific list entry with non-key leaf top element
Signed-off-by: Christian Hopps <chopps@labn.net>
Donatas Abraitis [Tue, 2 Jan 2024 08:42:28 +0000 (10:42 +0200)]
Merge pull request #15068 from chiragshah6/zdev
bgpd: lttng tp add ethtag to macip zebra send
Donatas Abraitis [Tue, 2 Jan 2024 08:40:14 +0000 (10:40 +0200)]
Merge pull request #15066 from chiragshah6/mdev1
bgpd: revamp evpn debugs nexthop and l3vni
Chirag Shah [Thu, 21 Dec 2023 00:23:25 +0000 (16:23 -0800)]
bgpd: unimport evpn routes when implicit withdraw
When bgp update is received for EVPN prefix
where for an existing path's nexthop becomes unreachable,
the path is marked as not VALID but the routes
were not unimported from tenant vrfs, which lead to
stale unicast route(s) and nexthop(s).
In Multipath scenario only a specific path may have marked as
not VALID, then specific path info for the EVPN prefix required to be
unimported from tenant vrf.
Ticket: #
3671288
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Christian Hopps [Sat, 30 Dec 2023 22:40:07 +0000 (22:40 +0000)]
build: protobuf is required so update building docs
- recommend using libyang 2.1.128 but accept 2.0.0 for now.
- update ubuntu building doc to add GRPC section
- update ubuntu reference docker builds to match grpc doc change
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 14:58:52 +0000 (14:58 +0000)]
lib: mgmtd: increase soft-max msg size to 64K
- remove unused mgmt client/server constants
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 14:38:49 +0000 (14:38 +0000)]
lib: fix coverity CID
1574981
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 14:34:44 +0000 (14:34 +0000)]
mgmtd: fix coverity CID
1574980
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 14:48:15 +0000 (14:48 +0000)]
lib: fix coverity CID
1574979
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 14:36:50 +0000 (14:36 +0000)]
mgmtd: fix coverity CID
1574978
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 30 Dec 2023 15:58:40 +0000 (15:58 +0000)]
lib: fix coverity CID
1574977
Signed-off-by: Christian Hopps <chopps@labn.net>
Igor Ryzhov [Fri, 29 Dec 2023 05:08:30 +0000 (07:08 +0200)]
Merge pull request #14492 from LabNConsulting/oper-state
oper state
Christian Hopps [Sun, 22 Oct 2023 09:23:43 +0000 (05:23 -0400)]
tests: add mgmt_oper topotest
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 28 Nov 2023 19:25:22 +0000 (14:25 -0500)]
tests: client testing
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 9 Dec 2023 04:49:10 +0000 (23:49 -0500)]
lib: fixes required after rebasing
lib: fix checkpatch warnings
lib: darr: disable check
mgmtd: fix initialization
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Wed, 1 Nov 2023 13:08:24 +0000 (09:08 -0400)]
zebra: fix cleanup of mgmt backend state
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sun, 22 Oct 2023 11:28:13 +0000 (07:28 -0400)]
zebra: fix oper-state walk bug
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 20 Oct 2023 08:53:05 +0000 (04:53 -0400)]
zebra: support yielding between oper state routes query
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 3 Oct 2023 21:53:11 +0000 (17:53 -0400)]
zebra: add zebra to mgmtd oper-state
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Wed, 13 Dec 2023 22:32:43 +0000 (17:32 -0500)]
lib: add dedicated API functions for native msgs
- reorg native message header
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Mon, 30 Oct 2023 09:09:19 +0000 (05:09 -0400)]
lib: northbound: add yielding and batching to oper-state queries
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 16 Dec 2023 22:17:39 +0000 (17:17 -0500)]
lib: darr: add ability to set MTYPE for dynamic arrays
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 26 Dec 2023 12:50:42 +0000 (07:50 -0500)]
lib: yang: add yang_get_node_keys() function
- comment out unused mem-leaking function.
- improve yang_dnode_get_path return type
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 31 Oct 2023 09:26:16 +0000 (05:26 -0400)]
tools: add more libyang iter macros to .clang-format
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Sat, 14 Oct 2023 02:51:11 +0000 (22:51 -0400)]
lib: create and use libyang tree during oper-state walk
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 10 Oct 2023 08:28:07 +0000 (04:28 -0400)]
lib: northbound: improve xpath functionality
Allow user to leave keys off of a list entry node at the end of the xpath. This
will return all list entries. Previously there was no way to just get the list
entries. One had to leave off the last list entry node which would then return
all list nodes as well as all the siblings at the same level.
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 20 Oct 2023 12:20:44 +0000 (08:20 -0400)]
lib: yang: add new functions
- yang_get_key_preds
- yang_lyd_new_list
A function like new_list was added recently to libyang,
this is a compat version.
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Mon, 16 Oct 2023 10:26:34 +0000 (06:26 -0400)]
lib: darr: add new access and str functions
- darr_last(), and darr_strdup_cap().
- strcat, strdup, strlen, strnul equivs.
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 27 Oct 2023 05:14:56 +0000 (01:14 -0400)]
tests: add debugs and count in static_simple test
Also add option to use unified config.
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Tue, 10 Oct 2023 00:52:54 +0000 (20:52 -0400)]
mgmtd: step 6: remove old unfinished get-data code
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 7 Jul 2023 03:23:24 +0000 (23:23 -0400)]
mgmtd: step 5: add get-tree txn functionality
Adds the guts of the get-tree functionality that is called by or calls
the FE and BE code for get-tree processing.
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 7 Jul 2023 05:01:57 +0000 (01:01 -0400)]
mgmtd: step 4: FE adapter get-tree functionality
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Fri, 7 Jul 2023 04:30:23 +0000 (00:30 -0400)]
mgmtd: step 3: BE adapter native message handling
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Mon, 30 Oct 2023 09:06:17 +0000 (05:06 -0400)]
lib: step 2: mgmtd: BE client code for get-tree functionality
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Mon, 30 Oct 2023 09:02:53 +0000 (05:02 -0400)]
lib: step 1: mgmtd: add FE get-tree functionality
Signed-off-by: Christian Hopps <chopps@labn.net>
Chirag Shah [Thu, 7 Sep 2023 22:43:43 +0000 (15:43 -0700)]
bgpd: lttng tp add ethtag to macip zebra send
Ticket:#
3597393
Testing Done:
2023-09-08T17:33:03.731 frr_bgp:evpn_mac_ip_zsend {'action': 'add',
'vni': 1003, 'eth_tag':
968006412 , 'mac': '00:02:00:00:00:40', 'ip': '',
'vtep': '27.0.0.16', 'esi': '00:00:00:00:00:00:00:00:00:00'}
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Mark Stapp [Wed, 7 Sep 2022 16:31:42 +0000 (12:31 -0400)]
bgpd: fix coverity warnings about evpn vpn variable
A few paths could see a vpn variable with a NULL value;
check and protect those paths.
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
Chirag Shah [Wed, 27 Dec 2023 01:36:49 +0000 (17:36 -0800)]
bgpd: revamp evpn debugs nexthop and l3vni
Add nexthop fied when import/unimport evpn route in vrf,
print bgp vrf instance name which contains "VRF" keyword.
Include pathcount which is list of paths linked to nexthop.
add and delete l3vni to keep symmetric "L3VNI" keyword as
used in other debug statements.
Ticket: #
3671288
Testing Done:
2023/12/27 05:10:03.339616 BGP: [HPE1G-3H7F2] ... new pi VRF vrf2
dest 0x55663e8372c0 (l 2) pi 0x55663e8374d0 (l 1, f 0x4010) nh 6.0.0.1
2023/12/27 05:58:56.650116 BGP: [MC0JJ-7ZYQB] ... delete pi VRF vrf2
dest 0x55663e885110 (l 5) pi 0x55663e8851e0 (l 1, f 0x4098) nh 6.0.0.1
2023/12/27 05:10:03.339581 BGP: [P4TBX-3W31N] evpn VRF vrf2 nh
6.0.0.1 rmac 00:02:00:00:00:04 add to zebra
2023/12/27 06:13:12.685906 BGP: [SWSCZ-2Z6M4] evpn vrf VRF vrf1 nh
6.0.0.1 del to zebra
2023/12/27 05:10:03.339603 BGP: [Y2EAK-4N7FV] path 60.1.1.111/32 linked
to VRF vrf2 nh 6.0.0.1 pathcount 0
2023/12/27 05:58:56.650125 BGP: [GVE17-CSNTB] path 81.1.1.0/24 unlinked
from VRF vrf2 nh 6.0.0.1 pathcount 16
2023/12/27 05:08:10.108038 ZEBRA: [Q8ZEK-CT776] Send L3VNI ADD 104001
VRF vrf1 RMAC 00:04:ba:10:10:62 VRR 1c:34:da:19:59:62 local-ip 6.0.0.31
filter none to bgp
2023/12/27 05:08:26.043121 ZEBRA: [R43YF-2MKZ3] Send L3VNI DEL 104001
VRF vrf1 to bgp
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Christian Hopps [Sun, 9 Jul 2023 09:51:20 +0000 (05:51 -0400)]
lib: yang: add tree "printing" utility functions
Signed-off-by: Christian Hopps <chopps@labn.net>
Christian Hopps [Thu, 6 Jul 2023 22:24:48 +0000 (18:24 -0400)]
lib: add simplified native msg support
This is intended to replace protobuf use in mgmtd.
Signed-off-by: Christian Hopps <chopps@labn.net>
Quentin Young [Sun, 24 Dec 2023 03:50:23 +0000 (22:50 -0500)]
Merge pull request #15063 from idryzhov/dev-doc-graphviz
doc: add graphiz dependency for dev docs
Igor Ryzhov [Fri, 22 Dec 2023 20:13:32 +0000 (22:13 +0200)]
Merge pull request #15053 from opensourcerouting/fix/drop_ipv6_address_configured
zebra: Drop ipv6_address_configured() function
Igor Ryzhov [Fri, 22 Dec 2023 14:08:43 +0000 (16:08 +0200)]
doc: add graphiz dependency for dev docs
There's a graph in cli.rst that needs graphviz to be built.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Donatas Abraitis [Fri, 22 Dec 2023 08:29:52 +0000 (10:29 +0200)]
github: Mark the build as failed if 'do not merge' label is set
This prevents us from merging PRs marked as 'do not merge'.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Konstantin Shalygin [Thu, 21 Dec 2023 13:34:26 +0000 (16:34 +0300)]
redhat: rpm spec: added protobuf-c to deps & fix bogus changelog date
Fixes for:
```
checking for protoc-c... no
configure: error: in `/builddir/build/BUILD/frr-frr-9.1':
configure: error: protobuf requested but protoc-c not found. Install protobuf-c.
```
And rpmlint warnings:
```
warning: line 208: It's not recommended to have unversioned Obsoletes: Obsoletes: gated mrt zebra frr-sysvinit
warning: bogus date in %changelog: Thu Oct 09 2023 Donatas Abraitis <donatas@opensourcerouting.org> - 9.1
line 208: It's not recommended to have unversioned Obsoletes: Obsoletes: gated mrt zebra frr-sysvinit
bogus date in %changelog: Thu Oct 09 2023 Donatas Abraitis <donatas@opensourcerouting.org> - 9.1
```
Signed-off-by: Konstantin Shalygin <k0ste@k0ste.ru>
Donatas Abraitis [Fri, 22 Dec 2023 07:32:32 +0000 (09:32 +0200)]
Merge pull request #15059 from donaldsharp/generate_support_bundle_on_test_failure
Generate support bundle on test failure
Donatas Abraitis [Fri, 22 Dec 2023 07:31:21 +0000 (09:31 +0200)]
Merge pull request #15060 from donaldsharp/keychain_free_no_i_really_mean_it
lib: Keychain.c was using free
Donald Sharp [Thu, 21 Dec 2023 22:01:56 +0000 (17:01 -0500)]
lib: Keychain.c was using free
This is a bit of a bummer that this slipped through
for so long.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donatas Abraitis [Thu, 21 Dec 2023 13:13:16 +0000 (15:13 +0200)]
zebra: Show IPv6 link-local interfaces under `show interface brief` output
Despite if it's managed by FRR or the kernel, show it. If the system has only
link-local addresses, we should show it unless it's a secondary one.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donald Sharp [Thu, 21 Dec 2023 15:26:47 +0000 (10:26 -0500)]
tools: Add some more data to support bundles
The ipv[4|6] vpn tables in bgp were not being
gathered. This would be useful for some situations
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 21 Dec 2023 15:24:23 +0000 (10:24 -0500)]
tests: Stop some warning messages on test runs
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Thu, 21 Dec 2023 15:22:22 +0000 (10:22 -0500)]
tests: Auto generate support bundle when a test fails
Tests can fail, let's be proactive and gather up a support
bundle when they fail. It will help diagnose the problem
to some extent.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donatas Abraitis [Thu, 21 Dec 2023 13:08:52 +0000 (15:08 +0200)]
zebra: Show IPv6 link-local interfaces under `show interface` output
Despite if it's managed by FRR or the kernel, show it.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 21 Dec 2023 12:25:19 +0000 (14:25 +0200)]
zebra: Push all configured IP addresses when the interface comes up
Let's say we this:
```
$ ip link set down dev r1-eth0
$ ip link set up dev r1-eth0
```
But at the same time we have this interface configured by the FRR too:
```
interface r1-eth0
ipv6 address fe80:1::1/64
exit
```
We never re-add fe80:1::1/64, when the interface comes up, and we have a
strange situation where NHT stops working and other stuff depending on NHT
stops too (BGP peering, etc.).
Closes: https://github.com/FRRouting/frr/issues/15050
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 21 Dec 2023 13:25:27 +0000 (15:25 +0200)]
zebra: Drop ipv6_address_configured() function
Not used.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Russ White [Wed, 20 Dec 2023 20:42:25 +0000 (15:42 -0500)]
Merge pull request #15047 from LabNConsulting/aceelindem/fix-opaque-functab-leak
ospfd: Fix opaque functab memory leak and opaque AS External LSA cleanup problems