Commit graph

38096 commits

Author SHA1 Message Date
Jafar Al-Gharaibeh 85cf1ed576 FRR Release 10.3
- Major highlights:
-   Lua 5.4 support
-   Fixed CVE-2024-55553
-   New match community-count BGP command to limit communities count
-   New set metric igp|aigp BGP command to inject IGP metric as MED into BGP
-   New bgp ipv6-auto-ra BGP command
-   Optimize BGP EVPN L2VNI/L3VIN remote routes processing
-   Respect non-transitive BGP extended communities between direct peers
-   Drop deprecated bgp network import-check exact command
-   Handle BGP ENHE (Extended Next Hop Encoding) capability via dynamic capability
-   Implement BGP connect backoff retry
-   Implement an ability to import BMP information from a separate BGP instance
-   Add support of BGP color extended community color-only types
-   Implement SBFD
-   Add support for SRv6 static SIDs
-   Implement embedded-rp for PIMv6
-   Implement AutoRP mapping-agent for PIM
-   Implement MSDP peer SA limiting

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-03-09 23:11:11 -05:00
Jafar Al-Gharaibeh bd84f13965 debian, redhat: updating changelog for new release
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2025-03-09 23:08:40 -05:00
Jafar Al-Gharaibeh e28ae87f92
Merge pull request #18353 from FRRouting/mergify/bp/dev/10.3/pr-18348
Topotest startup order (backport #18348)
2025-03-09 22:22:38 -05:00
Jafar Al-Gharaibeh 6080e01918
Merge pull request #18352 from FRRouting/mergify/bp/dev/10.3/pr-18338
Documentation typesafe (backport #18338)
2025-03-09 12:34:29 -05:00
Donald Sharp 04bdd8d539 tests: Have zebra startup look for the zserv.api socket
Ensure that the zserv.api socket is actually up and running
before moving onto other daemons after zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 009f42dd5b)
2025-03-09 03:53:04 +00:00
Donald Sharp 6122c87b37 tests: Allow mgmtd and zebra to fully come up before other daemons
Currently the topotest infrastructure is starting up daemons
in mgmtd,zebra, staticd then everything else.

The problem that is happening, under heavy load, is that
zebra may not be fully started and when a daemon attempts
to connect to it, it will not be able to connect.
Some of the daemons do not have great retry mechanisms at all.
In addition our normal systemctl startup scripts actually
wait a small amount of time for zebra to be ready before
moving onto the other daemons.

Let's make topotests startup a tiny bit more nuanced
and have mgmtd fully up before starting up zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit dd609bc069)
2025-03-09 03:53:04 +00:00
Donald Sharp c1e0369c3d doc: The sbfd documentation was not being included
Add the sbfd documentation, such as it is, to the
developer documentation so that it can be read
by people.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit f1c75deb8e)
2025-03-09 03:50:01 +00:00
Donald Sharp 3dbb3ac164 doc: Developer documentation missing some build instructions
The building-frr-for-ubuntu2404 and building-doc were missing
from the compilation of developer documents.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 4738cb51d2)
2025-03-09 03:50:01 +00:00
Donald Sharp cef035befe doc: Add typesafe conversion examples
Try to give some good examples of various lists being
converted over to the typesafe way of doing things.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 39909f9fb9)
2025-03-09 03:50:00 +00:00
Donald Sharp a40c800c2e
Merge pull request #18331 from FRRouting/mergify/bp/dev/10.3/pr-18214
zebra: Bring up 514 BGP neighbor sessions (backport #18214)
2025-03-06 20:33:21 -05:00
Donald Sharp c9be4cf746
Merge pull request #18332 from FRRouting/mergify/bp/dev/10.3/pr-18315
pimd: Fix PIM6 MLD VRF support (use recvmsg() pktinfo) (backport #18315)
2025-03-06 20:33:02 -05:00
Martin Buck e22eea10ab pimd: Fix PIM6 MLD VRF support (use recvmsg() pktinfo)
When receiving MLD messages, prefer pktinfo over msghdr.msg_name for
determining the source interface. The latter is just the VRF master
interface in case of VRF and we need the true interface the packet was
received on instead.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
(cherry picked from commit 374c8dc4db)
2025-03-06 18:43:14 +00:00
Soumya Roy 2dc730a551 tests: add support for 514 unnumbered/v4/v6 BGP sessions
Signed-off-by: Soumya Roy <souroy@nvidia.com>
(cherry picked from commit 10ff0d5e4c)
2025-03-06 18:40:37 +00:00
Soumya Roy dbb5a8347f tests: add support for bringimg up 514 BGP neighbors
Signed-off-by: Soumya Roy <souroy@nvidia.com>
(cherry picked from commit fd80124cca)
2025-03-06 18:40:36 +00:00
Soumya Roy 45183cf6ec zebra: Bring up 514 BGP neighbor sessions
Issue:
When 514 inerfaces/neighbors are configured, it creates socket error,
"Cannot allocate memory", when back to back V6 RA messages are tried
to be sent over the socket. This prevents interface, to know its peer's
link local address. Socket error comes when 1) try to join ICMPv6 all
router multicast group, back to back for all interfaces 2)send back to
back RA for all interfaces

Fix:
1)For ICMPv6 join case, we check if the interface has already joined
all router group, if not try to join. On failure, retry joining after
random amount of time determined 1 ms to ICMPV6_JOIN_TIMER_EXP_MS(100 ms)
2) For RA issue case, batch sending of RA mesages using wheel timer

Testing:
Monitor BGP session running sh bgp summary command

Before fix:
r1# sh bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.1.1, local AS number 1001 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 515, using 12 MiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
r1-eth0         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth1         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth2         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth3         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth4         4       1002        89        90        0    0    0 00:07:10            0        0 N/A
r1-eth5         4       1002        89        90        0    0    0 00:07:10            0        0 N/A

…..<snip>...
r1-eth252       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth253       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth254       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth255       4       1002        31        29        0    0    0 00:02:08            0        0 N/A
r1-eth256       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth257       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth258       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth259       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth260       4          0         0         0        0    0    0    never         Idle        0 N/A
……..<snip>…..
r1-eth511       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth512       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth513       4          0         0         0        0    0    0    never         Idle        0 N/A
r1-eth514       4          0         0         0        0    0    0    never         Idle        0 N/A
After fix:
r1# show bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.1.1, local AS number 1001 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 515, using 12 MiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
r1-eth0         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth1         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth2         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth3         4       1002        64        67        0    0    0 00:05:09            0        0 N/A
r1-eth4         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth5         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth6         4       1002        67        70        0    0    0 00:05:22            0        0 N/A
r1-eth7         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
r1-eth8         4       1002        87        87        0    0    0 00:07:04            0        0 N/A
....
r1-eth499       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth500       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth501       4       1002        19        22        0    0    0 00:01:21            0        0 N/A
r1-eth502       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth503       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth504       4       1002        20        23        0    0    0 00:01:30            0        0 N/A
r1-eth505       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth506       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth507       4       1002        22        25        0    0    0 00:01:39            0        0 N/A
r1-eth508       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth509       4       1002        17        20        0    0    0 00:01:13            0        0 N/A
r1-eth510       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth511       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth512       4       1002        19        22        0    0    0 00:01:22            0        0 N/A
r1-eth513       4       1002        43        43        0    0    0 00:03:22            0        0 N/A
r1-eth514       4       1002        43        43        0    0    0 00:03:22            0        0 N/A

Signed-off-by: Soumya Roy <souroy@nvidia.com>
(cherry picked from commit 6a75d33b5c)
2025-03-06 18:40:36 +00:00
Jafar Al-Gharaibeh 1c099098e4
Merge pull request #18302 from LabNConsulting/chopps/fix-nb-bugs
Bring in 2 northbound bug-fixes from master to 10.3
2025-03-03 12:59:48 -06:00
Christian Hopps a64ecbadcc lib: nb: fix bug with oper-state query on list data
The capacity of the xpath string was not guaranteed to be sufficient to hold all
the key predicates and so would truncate. Calculate the required space and
guarantee that it is available.

Signed-off-by: Christian Hopps <chopps@labn.net>
2025-03-03 15:44:33 +00:00
Christian Hopps 37893e4421 lib: nb: fix bug with keyless list specific index lookup
Signed-off-by: Christian Hopps <chopps@labn.net>
2025-03-03 15:44:33 +00:00
Donald Sharp f7b47fe1cf
Merge pull request #18291 from FRRouting/mergify/bp/dev/10.3/pr-18290
tools: Fix `frr-reload.py` error related to `static-sids` (backport #18290)
2025-03-03 10:35:27 -05:00
Donald Sharp 985c3f5528
Merge pull request #18296 from FRRouting/mergify/bp/dev/10.3/pr-18294
isisd: Correct edge insertion into TED (backport #18294)
2025-03-03 10:34:34 -05:00
Donald Sharp ab5f41ef54
Merge pull request #18292 from FRRouting/mergify/bp/dev/10.3/pr-18289
staticd: Fix `no srv6` command (backport #18289)
2025-03-03 09:38:03 -05:00
Olivier Dugeon 99e42dfb0d isisd: Correct edge insertion into TED
Edges are not correctly linked to Vertices during LSP processing. In function
lsp_to_edge_cb(), once edge created or updated from the LSP TLVs, the code try
to link the edge to destination vertices. In case the revert edge is not found,
the code try to found a destination vertex to link to. But, the sys_id used
for this operation corresponds to the source vertex. As a result, the edge is
attached as source and destination of the vertex. When Traffic Engineering is
stopped, TED is deleted which result into a double free of the edge attributes.
This cause a crash when attempt to free extended admin groupi the second time.

This patch removed wrong code which link twice the edge to the source vertex.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
(cherry picked from commit 605fc1dd64)
2025-03-03 12:39:23 +00:00
Carmine Scarpitta 3eec1b5116 tests: Add test case to verify that SIDs can be re-added
Add a test case to verify that staticd is able to re-install all SIDs
after disabling and re-enabling SRv6.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit 0e0eca6c5f)
2025-03-03 07:25:31 +00:00
Carmine Scarpitta 0fdd31f819 tests: Add test case to verify no srv6 command
Add a test case to verify that staticd removes all SIDs when the
`no srv6` command is executed.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit 58373a61d5)
2025-03-03 07:25:31 +00:00
Carmine Scarpitta f0cb5511b1 staticd: Fix no srv6 command
A user can configure static SIDs as follows:

[...]
segment-routing
 srv6
  static-sids
   sid fcbb:bbbb:1::/48 locator MAIN behavior uN
   sid fcbb:bbbb:1:fe00::/64 locator MAIN behavior uDT46
[...]

When the user runs vtysh and executes the `no srv6` command, the
expectation is that staticd will deallocate all SIDs.

However, currently FRR does not behaves as expected. After the user
executes `no srv6`, the SIDs are still present.

The problem is that vtysh does not forward the `no srv6` command to
mgmtd/staticd.

The `no srv6` command is defined using the `DEFUN_YANG_NOSH` macro,
which instructs `xref2vtysh.py` to skip the `no srv6` command during
the generation of `vtysh_cmd.c`. As a result, vtysh is unaware that it
should forward the `no srv6` command to mgmtd/staticd.

This commit fixes the issue by replacing `DEFUN_YANG_NOSH` with
`DEFUN_YANG`. This change ensures that `xref2vtysh.py` includes the
`no srv6` command when generating `vtysh_cmd.c` and makes vtysh forward
the `no srv6` command to mgmtd/staticd.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit b94be4a1c5)
2025-03-03 07:25:30 +00:00
Carmine Scarpitta 4b638cbed8 tools: Fix frr-reload.py error related to static-sids
```
[...]
segment-routing
 srv6
  static-sids
   sid fcbb:bbbb:1::/48 locator MAIN behavior uN
   sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
   sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
   sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
   sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
[...]
```

When the user has a configuration like the one above and runs the
command `frr-reload.py --reload`, the following error occurs:

```
[1129654|mgmtd] sending configuration
line 17: % Unknown command[76]:   sid fcbb:bbbb:1::/48 locator MAIN behavior uN
line 23: % Unknown command[76]:   sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
line 29: % Unknown command[76]:   sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
line 35: % Unknown command[76]:   sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
line 41: % Unknown command[76]:   sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2
```

The problem is that in `frr-reload-py` all commands that start a new
multi-line context must be included in the `ctx_keyword` dictionary.
However, the `static-sids` command is not part of the `ctx_keyword`
dictionary.

This commit fixes the problem by adding `static-sids` to `ctx_keyword`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit a515de1c46)
2025-03-03 07:14:40 +00:00
Jafar Al-Gharaibeh a4a3926582
Merge pull request #18265 from FRRouting/mergify/bp/dev/10.3/pr-18254
ospf6d: Fix use after free of router in OSPFv3 ABR route calculation. (backport #18254)
2025-03-01 15:02:53 -06:00
Jafar Al-Gharaibeh 13b386b657
Merge pull request #18284 from FRRouting/mergify/bp/dev/10.3/pr-18263
staticd: Add `no` form for `static-sids` command (backport #18263)
2025-02-28 14:46:40 -06:00
Carmine Scarpitta dc9c6adf4d tests: Add test case to verify that SIDs can be re-added
Add a test case to verify that staticd is able to re-install all SIDs
after deleting and re-adding them.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit 641f0c6deb)
2025-02-28 14:16:16 +00:00
Carmine Scarpitta f8ceda5a0c tests: Add test case to verify no static-sids command
Add a test case to verify that staticd removes all SIDs when the
`no static-sids` command is executed.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit 303be67e6a)
2025-02-28 14:16:16 +00:00
Carmine Scarpitta 720879b08a vtysh: Add no static-sids command
Previous commits introduced the `no` form for the `static-sids` command.
This change allow users to remove all static SIDs at once.

This commit makes the `no static-sids` command available in vtysh.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit 96134d1964)
2025-02-28 14:16:16 +00:00
Carmine Scarpitta c528ba2ea5 staticd: Add no form for static-sids command
Currently, when the user tries to delete all static SIDs with the
`no static-sids` command, staticd returns an error.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
% Unknown command: no  static-sids
```

The problem is the `static-sids` command does not support the `no` form.

This PR enables the `no` form for the `static-sids` command.

```
router# config
router(config)# segment-routing
router(sr)# srv6
router(srv6)# no static-sids
```

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit ab7a7541a6)
2025-02-28 14:16:15 +00:00
Carmine Scarpitta b44c54889c staticd: Convert static-sids command to DEFPY
This commit converts the `static-sids` command from `DEFUN` to `DEFPY`
to simplify the parsing of the command string definition.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
(cherry picked from commit e7640f3885)
2025-02-28 14:16:15 +00:00
Jafar Al-Gharaibeh 3a8426fe4d
Merge pull request #18279 from FRRouting/mergify/bp/dev/10.3/pr-18264
mgmtd: Prevent use after free (backport #18264)
2025-02-27 22:09:18 -06:00
Donald Sharp 71712f0bf6 mgmtd: Prevent use after free
ci is picking up this use after free on occasion:

    ERROR: AddressSanitizer: attempting to call malloc_usable_size() for pointer which is not owned: 0x6030001d94a0
        0 0x7fab994b7f04 in __interceptor_malloc_usable_size ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:119
        1 0x7fab994264f6 in __sanitizer::BufferedStackTrace::Unwind(unsigned long, unsigned long, void*, bool, unsigned int) ../../../../src/libsanitizer/sanitizer_common/sanitizer_stacktrace.h:131
        2 0x7fab994264f6 in __asan::asan_malloc_usable_size(void const*, unsigned long, unsigned long) ../../../../src/libsanitizer/asan/asan_allocator.cpp:1058
        3 0x7fab99039bcf in mt_count_free lib/memory.c:78
        4 0x7fab99039bcf in qfree lib/memory.c:130
        5 0x7fab98ff971a in hash_clean lib/hash.c:290
        6 0x56110cdb0e7f in mgmt_txn_hash_destroy mgmtd/mgmt_txn.c:1881
        7 0x56110cdb0e7f in mgmt_txn_destroy mgmtd/mgmt_txn.c:2013
        8 0x56110cd8e5de in mgmt_terminate mgmtd/mgmt.c:91
        9 0x56110cd8e003 in sigint mgmtd/mgmt_main.c:90
        10 0x7fab990bf4b0 in frr_sigevent_process lib/sigevent.c:117
        11 0x7fab990ea7a1 in event_fetch lib/event.c:1740
        12 0x7fab9901a24e in frr_run lib/libfrr.c:1245
        13 0x56110cd8e21f in main mgmtd/mgmt_main.c:290
        14 0x7fab98af9249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
        15 0x7fab98af9304 in __libc_start_main_impl ../csu/libc-start.c:360
        16 0x56110cd8dd30 in _start (/usr/lib/frr/mgmtd+0x3ad30)

    0x6030001d94a0 is located 0 bytes inside of 24-byte region [0x6030001d94a0,0x6030001d94b8)
    freed by thread T0 here:
        0 0x7fab994b76a8 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
        1 0x7fab99039bf0 in qfree lib/memory.c:131
        2 0x7fab98ff93e1 in hash_release lib/hash.c:227
        3 0x56110cdaabdc in mgmt_txn_unlock mgmtd/mgmt_txn.c:1931
        4 0x56110cdab049 in mgmt_txn_delete mgmtd/mgmt_txn.c:1841
        5 0x56110cdab0ce in mgmt_txn_hash_free mgmtd/mgmt_txn.c:1864
        6 0x7fab98ff970b in hash_clean lib/hash.c:288
        7 0x56110cdb0e7f in mgmt_txn_hash_destroy mgmtd/mgmt_txn.c:1881
        8 0x56110cdb0e7f in mgmt_txn_destroy mgmtd/mgmt_txn.c:2013
        9 0x56110cd8e5de in mgmt_terminate mgmtd/mgmt.c:91
        10 0x56110cd8e003 in sigint mgmtd/mgmt_main.c:90
        11 0x7fab990bf4b0 in frr_sigevent_process lib/sigevent.c:117
        12 0x7fab990ea7a1 in event_fetch lib/event.c:1740
        13 0x7fab9901a24e in frr_run lib/libfrr.c:1245
        14 0x56110cd8e21f in main mgmtd/mgmt_main.c:290
        15 0x7fab98af9249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

    previously allocated by thread T0 here:
        0 0x7fab994b83b7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
        1 0x7fab990392fd in qcalloc lib/memory.c:106
        2 0x7fab98ff8b4f in hash_get lib/hash.c:156
        3 0x56110cdb13ae in mgmt_txn_create_new mgmtd/mgmt_txn.c:1825
        4 0x56110cdb3b4d in mgmt_txn_notify_be_adapter_conn mgmtd/mgmt_txn.c:2212
        5 0x56110cd91178 in mgmt_be_adapter_conn_init mgmtd/mgmt_be_adapter.c:842
        6 0x7fab990ec6de in event_call lib/event.c:2019
        7 0x7fab9901a243 in frr_run lib/libfrr.c:1246
        8 0x56110cd8e21f in main mgmtd/mgmt_main.c:290
        9 0x7fab98af9249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

The only time that mgmt_txn_hash_free is called is in hash_clean.
There are other places that mgmt_txn_unlock/delete are called and
hash_release should be called.  Let's just notice when mgmtd is
being called from the hash_clean and not call hash_release (since
we know it is being released already)

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 62f35c7bdb)
2025-02-27 20:40:07 +00:00
Jafar Al-Gharaibeh 24cb997ee6
Merge pull request #18272 from louis-6wind/bgp-hidden-10.3
bgpd: fix default instance when leaving the hidden state. (backport #18119)
2025-02-27 10:12:14 -06:00
Louis Scalbert 6ffdc7bb9f tests: check as number in show run
Creates the default VRF instance after the other VRF instances. The
default VRF instance is created in hidden state. Check that AS number
in show run is correctly written.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 077a2b0dfc)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:58 +01:00
Louis Scalbert fa0b951771 bgpd: fix leaving hidden state
Upon configuration of a VRF instance that references an absent default
VRF with "import vrf default", the default instance is created in hidden
state. However, the default instance is not properly un-hidden when
configured.

Restore the behavior prior to commit below.

Fixes: 9f7177af13 ("bgpd: fix duplicate BGP instance created with unified config")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 70e07678bf)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:57 +01:00
Louis Scalbert 5aa0bb5156 tests: add bgp_l3vpn_hidden topotest
Test that leaving the hidden BGP instance state is working.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 118afe4690)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:57 +01:00
Alexander Skorichenko a634290dc1 bgpd: update AS value of a hidden bgp instance
'import vrf VRF' could define a hidden bgp instance with
the default AS_UNSPECIFIED (i.e. = 1) value.
When a
	router bgp AS vrf VRF
gets configured later on, replace this AS_UNSPECIFIED setting
with a requested value.

Fixes: 9680831518 ("bgpd: fix as_pretty mem leaks when un-hiding")
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 1515a59202)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:56 +01:00
Louis Scalbert e044fb747c Revert "bgpd: fix bgp vrf instance creation from implicit"
This reverts commit 2ff08af78e.

The fix is obviously wrong.

Link: 2ff08af78e
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 339206341f)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:56 +01:00
Louis Scalbert cec0da3d9b bgpd: fix process_queue when un-hiding
bgp_process_queue_init() is not called in bgp_create() when leaving the
BGP instance hidden state because of the following goto:

>	if (hidden) {
>		bgp = bgp_old;
>		goto peer_init;
>	}

Upon reconfiguration of the default instance, the prefixes are never set
into a meta queue by mq_add_handler(). They are never processed for
zebra RIB installation and announcements of update/withdraw.

Do not delete the BGP process_queue when hiding.

Fixes: 4d0e7a49cf ("bgpd: VRF-Lite fix default bgp delete")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 71a3756f2d)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:55 +01:00
Louis Scalbert 64dba6b488 bgpd: fix default instance name when un-hiding
When unconfiguring a default BGP instance with VPN SAFI configurations,
the default BGP structure remains but enters a hidden state. Upon
reconfiguration, the instance name incorrectly appears as "VIEW ?"
instead of "VRF default". And the name_pretty pointer

The name_pretty pointer is replaced by another one with the incorrect
name. This also leads to a memory leak as the previous pointer is not
properly freed.

Do not rewrite the instance name.

Fixes: 4d0e7a49cf ("bgpd: VRF-Lite fix default bgp delete")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit d2ff7e8a21)
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2025-02-27 09:43:55 +01:00
Acee Lindem 2a22f2cd8c ospf6d: Fix use after free of router in OSPFv3 ABR route calculation.
This PR fixes FRR issue https://github.com/FRRouting/frr/issues/18040. The
OSPFv3 route is locked during the ABR calculation since there are
scenarios under which it is freed. The OSPFv3 ABR computation is
sub-optimal and this PR doesn't attempt to rework it.

Signed-off-by: Acee Lindem <acee@lindem.com>
(cherry picked from commit 06af50eace)
2025-02-26 17:48:46 +00:00
Donald Sharp 5bbf45dc56
Merge pull request #18207 from FRRouting/mergify/bp/dev/10.3/pr-17666
pimd: During prefix-list update, behave as PIM_UPSTREAM_NOTJOINED sta… (backport #17666)
2025-02-26 11:15:31 -05:00
Donald Sharp 308daf81ca
Merge pull request #18255 from Jafaral/no-bgp-hidden
Revert "bgpd: fix default instance when leaving the hidden state (backport 10.3)" #18162
2025-02-26 08:24:51 -05:00
Russ White 45a67326ac
Merge pull request #18227 from FRRouting/mergify/bp/dev/10.3/pr-18210
bgpd: remove dmed check not required in bestpath selection (backport #18210)
2025-02-25 10:40:48 -05:00
Donald Sharp abae4012a7
Merge pull request #18232 from FRRouting/mergify/bp/dev/10.3/pr-18231
Fix oper-state queries that involve choice/case nodes (backport #18231)
2025-02-25 10:38:16 -05:00
Donald Sharp 19f9e46c81
Merge pull request #18244 from FRRouting/mergify/bp/dev/10.3/pr-18225
pim: Fix autorp group joins (backport #18225)
2025-02-25 10:37:55 -05:00
Donald Sharp f8276261bf
Merge pull request #18246 from FRRouting/mergify/bp/dev/10.3/pr-18226
pim: Fix vrf binding of autorp and mroute socket (backport #18226)
2025-02-25 10:37:12 -05:00