Commit Graph

34837 Commits

Author SHA1 Message Date
Donatas Abraitis
99f99dfaa3 vtysh: Include fnctl.h for vtysh_main
Fixing compilation for Alpine Linux:

```
25 91.59 vtysh/vtysh_main.c: In function 'vtysh_flock_config':
25 91.59 vtysh/vtysh_main.c:276:20: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
25 91.59   276 |         flock_fd = open(flock_file, O_RDONLY, 0644);
25 91.59       |                    ^~~~
25 91.59       |                    popen
25 91.60 vtysh/vtysh_main.c:276:37: error: 'O_RDONLY' undeclared (first use in this function)
25 91.60   276 |         flock_fd = open(flock_file, O_RDONLY, 0644);
25 91.60       |                                     ^~~~~~~~
25 91.60 vtysh/vtysh_main.c:276:37: note: each undeclared identifier is reported only once for each function it appears in
25 91.60   CC       zebra/if_netlink.o
25 91.61 vtysh/vtysh_main.c: In function 'main':
25 91.61 vtysh/vtysh_main.c:637:49: error: 'O_CREAT' undeclared (first use in this function)
25 91.61   637 |                         fp = open(history_file, O_CREAT | O_EXCL,
25 91.61       |                                                 ^~~~~~~
25 91.62 vtysh/vtysh_main.c:637:59: error: 'O_EXCL' undeclared (first use in this function)
25 91.62   637 |                         fp = open(history_file, O_CREAT | O_EXCL,
25 91.62       |                                                           ^~~~~~
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e9ff59401c)
2024-03-12 20:34:30 +00:00
Donatas Abraitis
59d117c344 lib: Fix unknown sig_atomic_t compile error
This is happening for Alpine Linux.

```
26 64.59 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.59    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.59       |                  ^~~~~~~~~~~~
26 64.60 In file included from ./lib/libfrr.h:12,
26 64.60                  from ./lib/vty.h:28,
26 64.60                  from ./lib/command.h:11,
26 64.60                  from ./lib/debug.h:11,
26 64.60                  from ./mgmtd/mgmt.h:12,
26 64.60                  from mgmtd/mgmt_history.c:14:
26 64.60 ./lib/sigevent.h:23:18: error: unknown type name 'sig_atomic_t'
26 64.60    23 |         volatile sig_atomic_t caught; /* private member   */
26 64.60       |                  ^~~~~~~~~~~~
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit f03b0bfaa4)
2024-03-12 20:34:30 +00:00
Donatas Abraitis
378e8d0845 docker: Use libyang 2.1.128 for Alpine builds
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 3ca01bf1e9)
2024-03-12 20:34:30 +00:00
Igor Ryzhov
a0e5996d60
Merge pull request #15529 from FRRouting/mergify/bp/dev/10.0/pr-15509
pimd: Cleanup inclusion of headers (backport #15509)
2024-03-12 21:44:05 +02:00
Donald Sharp
c1551644d6 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>
(cherry picked from commit a5389154a1)
2024-03-12 15:12:06 +00:00
Donatas Abraitis
abc238d65f
Merge pull request #15519 from FRRouting/mergify/bp/dev/10.0/pr-15513
bgpd: Fix `no` form for `neighbor X capability software-version` (backport #15513)
2024-03-12 12:13:52 +01:00
Donatas Abraitis
baf24d2fec 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>
(cherry picked from commit 2038fad33e)
2024-03-11 11:18:42 +00:00
Donatas Abraitis
e4885819f5
Merge pull request #15512 from FRRouting/mergify/bp/dev/10.0/pr-15510
fix rip/ripng yang rpcs (backport #15510)
2024-03-09 20:54:00 +01:00
Igor Ryzhov
142124ed3c 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>
(cherry picked from commit c544b9e8e7)
2024-03-09 10:16:38 +00:00
Igor Ryzhov
cd8ced1dbf 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>
(cherry picked from commit 1ba97510e2)
2024-03-09 10:16:38 +00:00
Igor Ryzhov
2cab993239
Merge pull request #15508 from FRRouting/mergify/bp/dev/10.0/pr-15497
a couple of fixes for "show running-config" (backport #15497)
2024-03-09 00:07:11 +02:00
Igor Ryzhov
8824368726 ripngd: fix missing "exit" for "router ripng"
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 1db1fbf7a6)
2024-03-08 13:12:50 +00:00
Igor Ryzhov
0cd3555cb8 ripd: fix missing "exit" for "router rip"
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit aaa6c7088e)
2024-03-08 13:12:49 +00:00
Igor Ryzhov
7b60258be5 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>
(cherry picked from commit 18da736949)
2024-03-08 13:12:49 +00:00
Igor Ryzhov
68eb06de45
Merge pull request #15503 from FRRouting/mergify/bp/dev/10.0/pr-15498
mgmtd: change error message (backport #15498)
2024-03-07 18:08:01 +02:00
Igor Ryzhov
8caf17cdc4 mgmtd: change error message
Make the wording clearer about what's going on.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit bbaf34b117)
2024-03-07 07:26:36 +00:00
Donatas Abraitis
0f81bdcbeb
Merge pull request #15495 from FRRouting/mergify/bp/dev/10.0/pr-15487
lib: fix apply_finish callback in northbound (backport #15487)
2024-03-06 13:22:28 +02:00
Donatas Abraitis
cbfb7b219a
Merge pull request #15491 from FRRouting/mergify/bp/dev/10.0/pr-15222
bgpd:aggr summary-only remove suppressed from evpn (backport #15222)
2024-03-06 13:22:11 +02:00
Igor Ryzhov
0f2a785789 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>
(cherry picked from commit 8287fbe453)
2024-03-06 06:44:47 +00:00
Chirag Shah
af2b6fbd4c 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>
(cherry picked from commit f345460b7e)
2024-03-05 20:43:14 +00:00
Chirag Shah
a3afaffffb 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>
(cherry picked from commit 5cb7712b3e)
2024-03-05 20:43:14 +00:00
Donatas Abraitis
e7965eacc5
Merge pull request #15484 from FRRouting/mergify/bp/dev/10.0/pr-15479
doc: Fix one spelling `dissallowed` to `disallowed` (backport #15479)
2024-03-05 17:37:55 +02:00
Donatas Abraitis
0c62fc6824 doc: Fix one spelling dissallowed to disallowed
Closes: https://github.com/FRRouting/frr/issues/15465

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e993ba1812)
2024-03-05 13:50:15 +00:00
Igor Ryzhov
5e27a213d8
Merge pull request #15478 from FRRouting/mergify/bp/dev/10.0/pr-15470
lib: fix __darr_in_vsprintf (backport #15470)
2024-03-05 11:23:37 +02:00
Igor Ryzhov
f23f58a6a4 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>
(cherry picked from commit cb6032d6b3)
2024-03-05 03:45:38 +00:00
Igor Ryzhov
e5da17897c 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>
(cherry picked from commit ee0c1cc1e4)
2024-03-05 03:45:38 +00:00
Donatas Abraitis
a976189dd2
Merge pull request #15463 from FRRouting/mergify/bp/dev/10.0/pr-15461
fix warning if ripngd disabled (backport #15461)
2024-03-02 08:13:23 +02:00
Vincent JARDIN
db88f3dc82 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>
(cherry picked from commit 717b3350bb)
2024-03-01 21:13:04 +00:00
Donatas Abraitis
53d481dd51
Merge pull request #15451 from FRRouting/mergify/bp/dev/10.0/pr-15447
bmp: fix vty_out for monitor afi loc-rib (backport #15447)
2024-02-28 19:33:25 +02:00
Donatas Abraitis
d60dea7db4
Merge pull request #15452 from FRRouting/mergify/bp/dev/10.0/pr-15368
bgpd: fix 6vpe nexthop (backport #15368)
2024-02-28 19:32:45 +02:00
Louis Scalbert
127e872fda bgpd: fix 6vpe nexthop
6vPE enables the announcement of IPv6 VPN prefixes through an IPv4 BGP
session. In this scenario, the next hop addresses for these prefixes are
represented in an IPv4-mapped IPv6 format, noted as ::ffff:[IPv4]. This
format indicates to the peer that it should route these IPv6 addresses
using information from the IPv4 nexthop. For example:

> Path Attribute - MP_REACH_NLRI
> [...]
>     Address family identifier (AFI): IPv6 (2)
>     Subsequent address family identifier (SAFI): Labeled VPN Unicast (128)
>     Next hop:  RD=0:0 IPv6=::ffff:192.0.2.5 RD=0:0 Link-local=fe80::501d:42ff:feef:b021
>     Number of Subnetwork points of attachment (SNPA): 0

This rule is set out in RFC4798:

> The IPv4 address of the egress 6PE router MUST be encoded as an
> IPv4-mapped IPv6 address in the BGP Next Hop field.

However, in some situations, bgpd sends a standard nexthop IPv6 address
instead of an IPv4-mapped IPv6 address because the outgoing interface for
the BGP session has a valid IPv6 address. This is problematic because
the peer router may not be able to route the nexthop IPv6 address (ie.
if the outgoing interface has not IPv6).

Fix the issue by always sending a IPv4-mapped IPv6 address as nexthop
when the BGP session is on IPv4 and address family IPv6.

Link: https://datatracker.ietf.org/doc/html/rfc4798#section-2
Fixes: 92d6f76 ("lib,zebra,bgpd: Fix for nexthop as IPv4 mapped IPv6 address")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 0325116a27)
2024-02-28 09:35:34 +00:00
Philippe Guibert
bd030c14cb topotests: add an ebgp 6vpe test
This test uses the connected ipv4 mapped ipv6 prefix
to resolve the received BGP routes.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: François Dumontet <francois.dumontet@6wind.com>
(cherry picked from commit 4d7df91752)
2024-02-28 09:35:34 +00:00
Farid Mihoub
6b2cf2a1b7 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>
(cherry picked from commit 3104d482e9)
2024-02-28 09:34:34 +00:00
Russ White
5761af9b07
Merge pull request #15442 from FRRouting/mergify/bp/dev/10.0/pr-15399
zebra: fix crash when macvlan link-interface is in another netns (backport #15399)
2024-02-27 14:16:35 -05:00
Russ White
80209efe97
Merge pull request #15439 from FRRouting/mergify/bp/dev/10.0/pr-15431
ospfd: Solved crash in OSPF TE parsing (backport #15431)
2024-02-27 14:16:15 -05:00
Russ White
1d1ddfb048
Merge pull request #15437 from FRRouting/mergify/bp/dev/10.0/pr-15427
lib: fix access/prefix-list entry update (backport #15427)
2024-02-27 13:39:07 -05:00
Louis Scalbert
2b5e0f3cdf zebra: fix crash if macvlan link in another netns
A macvlan interface can have its underlying link-interface in another
namespace (aka. netns). However, by default, zebra does not know the
interface from the other namespaces. It results in a crash the pointer
to the link interface is NULL.

> 6  0x0000559d77a329d3 in zebra_vxlan_macvlan_up (ifp=0x559d798b8e00) at /root/frr/zebra/zebra_vxlan.c:4676
> 4676		link_zif = link_ifp->info;
> (gdb) list
> 4671		struct interface *link_ifp, *link_if;
> 4672
> 4673		zif = ifp->info;
> 4674		assert(zif);
> 4675		link_ifp = zif->link;
> 4676		link_zif = link_ifp->info;
> 4677		assert(link_zif);
> 4678
> (gdb) p zif->link
> $2 = (struct interface *) 0x0
> (gdb) p zif->link_ifindex
> $3 = 15

Fix the crash by returning when the macvlan link-interface is in another
namespace. No need to go further because any vxlan under the macvlan
interface would not be accessible by zebra.

Link: https://github.com/FRRouting/frr/issues/15370
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 44e6e3868d)
2024-02-27 16:32:23 +00:00
Russ White
7f7325a70e
Merge pull request #15412 from FRRouting/mergify/bp/dev/10.0/pr-15377
lib: Do not convert EVPN prefixes into IPv4/IPv6 if not needed (backport #15377)
2024-02-27 10:44:27 -05:00
Olivier Dugeon
f3fe2d9521 ospfd: Solved crash in OSPF TE parsing
Iggy Frankovic discovered an ospfd crash when perfomring fuzzing of OSPF LSA
packets. The crash occurs in ospf_te_parse_te() function when attemping to
create corresponding egde from TE Link parameters. If there is no local
address, an edge is created but without any attributes. During parsing, the
function try to access to this attribute fields which has not been created
causing an ospfd crash.

The patch simply check if the te parser has found a valid local address. If not
found, we stop the parser which avoid the crash.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
(cherry picked from commit a73e66d073)
2024-02-27 15:42:54 +00:00
Igor Ryzhov
4ae4355626 lib: fix prefix-list entry update
When a prefix-list entry is updated, current NB code calls the
replacement code multiple times, once per each updated field. It means
that when multiple fields of an entry are changed in a single commit,
the replacement is done with an interim state of a prefix-list instead
of a final one. To fix the issue, we should call the replacement code
once, after all fields of an entry are updated.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 0bc2ab8598)
2024-02-27 11:40:00 +00:00
Igor Ryzhov
f9960582ee lib: fix access-list entry update
When an access-list entry is updated, current NB code calls notification
hooks for each updated field. It means that when multiple fields of an
entry are changed in a single commit, the hooks are run with an interim
state of an access-list instead of a final one. To fix the issue, we
should call the hooks once, after all fields of an entry are updated.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit a9460ae713)
2024-02-27 11:40:00 +00:00
Donatas Abraitis
1d64549c3d
Merge pull request #15435 from FRRouting/mergify/bp/dev/10.0/pr-15387
bgpd: fix no bgp as-path access-list issue  (backport #15387)
2024-02-27 13:36:01 +02:00
Francois Dumontet
8acb85bd5b bgpd: fix no bgp as-path access-list issue
router bgp 65001
 no bgp ebgp-requires-policy
 neighbor 192.168.1.2 remote-as external
 neighbor 192.168.1.2 timers 3 10
 address-family ipv4 unicast
  neighbor 192.168.1.2 route-map r2 in
 exit-address-family
!
ip prefix-list p1 seq 5 permit 172.16.255.31/32
!
route-map r2 permit 10
 match ip address prefix-list p1
 set as-path exclude 65003
route-map r2 permit 20
 set as-path exclude all
!

we make the following commands

bgp as-path access-list FIRST permit ^65
bgp as-path access-list SECOND permit 2
 route-map r2 permit 6
  set as-path exclude as-path-access-list SECOND

and then

no bgp as-path access-list SECOND permit 2
clear bgp *

we have the following crash in bgp

               Stack trace of thread 536083:
                #0  0x00007f87f8aacfe1 raise (libpthread.so.0 + 0x12fe1)
                #1  0x00007f87f8cf6870 core_handler (libfrr.so.0 +
		    0xf6870)
                #2  0x00007f87f8aad140 __restore_rt (libpthread.so.0 +
		    0x13140)
                #3  0x00007f87f89a5122 __GI___regexec (libc.so.6 +
		    0xdf122)
                #4  0x000055d7f198b4a7 aspath_filter_exclude_acl (bgpd +
		    0x2054a7)
                #5  0x000055d7f1902187 route_set_aspath_exclude (bgpd +
		    0x17c187)
                #6  0x00007f87f8ce54b0 route_map_apply_ext (libfrr.so.0
		    + 0xe54b0)
                #7  0x000055d7f18da925 bgp_input_modifier (bgpd +
		    0x154925)
                #8  0x000055d7f18e0647 bgp_update (bgpd + 0x15a647)
                #9  0x000055d7f18e4772 bgp_nlri_parse_ip (bgpd +
		    0x15e772)
                #10 0x000055d7f18c38ae bgp_nlri_parse (bgpd + 0x13d8ae)
                #11 0x000055d7f18c6b7a bgp_update_receive (bgpd +
		    0x140b7a)
                #12 0x000055d7f18c8ff3 bgp_process_packet (bgpd +
		    0x142ff3)
                #13 0x00007f87f8d0dce0 thread_call (libfrr.so.0 +
		    0x10dce0)
                #14 0x00007f87f8cacb28 frr_run (libfrr.so.0 + 0xacb28)
                #15 0x000055d7f18435da main (bgpd + 0xbd5da)
                #16 0x00007f87f88e9d0a __libc_start_main (libc.so.6 +
		    0x23d0a)
                #17 0x000055d7f18415fa _start (bgpd + 0xbb5fa)

analysis

crash is due to the fact that there were always a pointer from
as-path exclude to deleted as-path access list.

fix
we add a backpointer mechanism to manage the dependency beetween
as-path access-list  and aspath exclude.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
(cherry picked from commit 100ef15262)
2024-02-27 07:53:25 +00:00
Francois Dumontet
8273b61ef0 tests: extend tests for aspath exclude
adding a tests about:
"no bgp as-path access-list" command.

the folloxing "clear bgp *" command leads to the
crash exhibited above.

a sleep had been added to capture the crash befor the end of scenario.

50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5f05cbb9c0 (LWP 1371086))]
(gdb) bt
    context=0x7ffcf2c216c0) at lib/sigevent.c:248
    acl_list=0x55c976ec03c0) at bgpd/bgp_aspath.c:1688
    dummy=0x7ffcf2c22340, object=0x7ffcf2c21e70) at bgpd/bgp_routemap.c:2401
    match_object=0x7ffcf2c21e70, set_object=0x7ffcf2c21e70, pref=0x0)
    at lib/routemap.c:2687
    attr=0x7ffcf2c220b0, afi=AFI_IP, safi=SAFI_UNICAST, rmap_name=0x0, label=0x0,
    num_labels=0, dest=0x55c976ebeaf0) at bgpd/bgp_route.c:1807
    addpath_id=0, attr=0x7ffcf2c22450, afi=AFI_IP, safi=SAFI_UNICAST, type=10,
    sub_type=0, prd=0x0, label=0x0, num_labels=0, soft_reconfig=0, evpn=0x0)
    at bgpd/bgp_route.c:4424
    packet=0x7ffcf2c22410) at bgpd/bgp_route.c:6266
    packet=0x7ffcf2c22410, mp_withdraw=false) at bgpd/bgp_packet.c:341
    peer=0x55c976e89ed0, size=43) at bgpd/bgp_packet.c:2414
    at bgpd/bgp_packet.c:3899

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
(cherry picked from commit 324fa21015)
2024-02-27 07:53:24 +00:00
Donatas Abraitis
3497d85dcc
Merge pull request #15433 from FRRouting/mergify/bp/dev/10.0/pr-15430
lib: fix setting temporary log options for libyang (backport #15430)
2024-02-27 09:48:15 +02:00
Igor Ryzhov
0b2d943811 lib: fix setting temporary log options for libyang
By calling `ly_log_options` with `LY_LOSTORE`, the current code
effectively disables libyang logging and never enables it back. The call
is done to get the current logging options, but we don't really need
that. When looking for a schema node, we don't want neither to log nor
to store the error, so simply set the temporary options to 0.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 3cd6ddaec6)
2024-02-26 15:27:27 +00:00
Igor Ryzhov
493c991315
Merge pull request #15428 from FRRouting/mergify/bp/dev/10.0/pr-15426
bgpd, yang: fix missing mandatory/default statements on some leafs (backport #15426)
2024-02-26 13:52:38 +02:00
Igor Ryzhov
7dd059f6f3 bgpd, yang: fix missing mandatory/default statements on some leafs
The code expects these leafs to always exist. If they are not set, the
daemon would crash. CLI always sets them, but we should properly mark
them as mandatory/default to prevent them from being missed when using
the API.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 83a3b0f10f)
2024-02-26 07:44:44 +00:00
Donatas Abraitis
3496e9b205
Merge pull request #15425 from FRRouting/mergify/bp/dev/10.0/pr-15423
lib: fix processing of choices in northbound (backport #15423)
2024-02-26 08:06:57 +02:00
Christian Hopps
6a921b2fc0 tests: add test for required choice/np-container callbacks
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit e5acf6797c)
2024-02-25 21:55:03 +00:00