]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
7 months agobgpd: VRF-Lite fix default bgp delete
Don Slice [Fri, 16 Jul 2021 18:36:10 +0000 (14:36 -0400)]
bgpd: VRF-Lite fix default bgp delete

1. bgp coredump is observed when we delete default bgp instance
   when we have multi-vrf; and route-leaking is enabled between
   default, non-default vrfs.
Removing default router bgp when routes leaked between non-default vrfs.
- Routes are leaked from VRF-A to VRF-B
- VPN table is created with auto RD/RT in default instance.
- Default instance is deleted, we try to unimport the routes from all VRFs
- non-default VRF schedules a work-queue to process deleted routes.
- Meanwhile default bgp instance clears VPN tables and free the route
  entries as well, which are still referenced by non-default VRFs which
  have imported routes.
- When work queue process starts to delete imported route in VRF-A it cores
  as it accesses freed memory.

- Whenever we delete bgp in default vrf, we skip deleting routes in the vpn
  table, import and export lists.
- The default hidden bgp instance will not be listed in any of the show
  commands.
- Whenever we create new default instance, handle it with AS number change
  i.e. old hidden default bgp's AS number is updated and also changing
  local_as for all peers.

2. A default instance is created with ASN of the vrf with the import
  statement.
  This may not be the ASN desired for the default table
- First problem with current behavior.
  Define two vrfs with different ASNs and then add import between.
  starting without any bgp config (no default instance)
  A default instance is created with ASN of the vrf with the import
  statement.
  This may not be the ASN desired for the default table
- Second related problem.  Start with a default instance and a vrf in a
  different ASN. Do an import statement in the vrf for a bgp vrf instance
  not yet defined and it auto-creates that bgp/vrf instance and it inherits
  the ASN of the importing vrf
- Handle bgp instances with different ASNs and handle ASN for auto created
  BGP instance

Signed-off-by: Kantesh Mundaragi <kmundaragi@vmware.com>
7 months agoMerge pull request #16720 from opensourcerouting/fix/default_originate_not_needed_if_...
Russ White [Wed, 18 Sep 2024 14:11:23 +0000 (10:11 -0400)]
Merge pull request #16720 from opensourcerouting/fix/default_originate_not_needed_if_not_enabled

bgpd: Do not scan update-groups if default-originate timer is set to 0

7 months agoMerge pull request #16849 from opensourcerouting/fix/remove_rpki_cmd
Donald Sharp [Wed, 18 Sep 2024 11:27:18 +0000 (07:27 -0400)]
Merge pull request #16849 from opensourcerouting/fix/remove_rpki_cmd

bgpd: Remove deprecated RPKI command

7 months agoMerge pull request #16840 from LabNConsulting/chopps/yang-lib
Donald Sharp [Wed, 18 Sep 2024 11:25:20 +0000 (07:25 -0400)]
Merge pull request #16840 from LabNConsulting/chopps/yang-lib

add ietf-yang-library support

7 months agoMerge pull request #16852 from sri-mohan1/srib-24-frr-a
Donald Sharp [Wed, 18 Sep 2024 11:23:56 +0000 (07:23 -0400)]
Merge pull request #16852 from sri-mohan1/srib-24-frr-a

bgpd: changes for code maintainability

7 months agoMerge pull request #16850 from enkechen-panw/show-stat
Donatas Abraitis [Wed, 18 Sep 2024 06:57:03 +0000 (08:57 +0200)]
Merge pull request #16850 from enkechen-panw/show-stat

bgpd: add counters for redistributed and aggregated routes

7 months agobgpd: changes for code maintainability
sri-mohan1 [Wed, 18 Sep 2024 05:52:08 +0000 (11:22 +0530)]
bgpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
7 months agotests: add test for new ietf-yang-library support
Christian Hopps [Tue, 17 Sep 2024 07:54:26 +0000 (03:54 -0400)]
tests: add test for new ietf-yang-library support

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agomgmtd: add ietf-yang-library support
Christian Hopps [Tue, 17 Sep 2024 01:34:10 +0000 (21:34 -0400)]
mgmtd: add ietf-yang-library support

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agobgpd: add counters for redistributed and aggregated routes
Enke Chen [Tue, 17 Sep 2024 22:12:05 +0000 (15:12 -0700)]
bgpd: add counters for redistributed and aggregated routes

Add counters for redistributed routes, and local aggregates to the
output of "show ip bgp statistics".

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
7 months agobgpd: Remove deprecated RPKI command
Donatas Abraitis [Tue, 17 Sep 2024 20:04:30 +0000 (23:04 +0300)]
bgpd: Remove deprecated RPKI command

`rpki cache <A.B.C.D|WORD> ...`

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16774 from donaldsharp/bgp_give_some_ordering_increases
Russ White [Tue, 17 Sep 2024 15:01:34 +0000 (11:01 -0400)]
Merge pull request #16774 from donaldsharp/bgp_give_some_ordering_increases

Bgp give some ordering increases

7 months agoMerge pull request #16809 from louis-6wind/fix-rcap-double-free
Donald Sharp [Tue, 17 Sep 2024 12:33:43 +0000 (08:33 -0400)]
Merge pull request #16809 from louis-6wind/fix-rcap-double-free

isisd: fix rcap tlv double-free crash

7 months agoMerge pull request #16839 from LabNConsulting/chopps/edit-reply
Donald Sharp [Tue, 17 Sep 2024 12:30:35 +0000 (08:30 -0400)]
Merge pull request #16839 from LabNConsulting/chopps/edit-reply

Add `created` and `changed` booleans to `edit-reply` message

7 months agolib: mgmtd: add `changed` and `created` to edit-reply msg
Christian Hopps [Tue, 17 Sep 2024 06:27:31 +0000 (02:27 -0400)]
lib: mgmtd: add `changed` and `created` to edit-reply msg

- This is used for various return values in RESTCONF

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agolib: mgmtd: cleanup error value for native messaging
Christian Hopps [Tue, 17 Sep 2024 06:27:03 +0000 (02:27 -0400)]
lib: mgmtd: cleanup error value for native messaging

- Now if positive it's libyang LY_ERR, otherwise it's `-errno` value.

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agomgmtd: allow dest DS "running" if implicit lock+commit
Christian Hopps [Sat, 14 Sep 2024 10:52:43 +0000 (06:52 -0400)]
mgmtd: allow dest DS "running" if implicit lock+commit

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agolib: constify yang_resolve_snode_xpath results
Christian Hopps [Sat, 27 Jul 2024 05:07:57 +0000 (01:07 -0400)]
lib: constify yang_resolve_snode_xpath results

Signed-off-by: Christian Hopps <chopps@labn.net>
ang

7 months agoMerge pull request #16828 from enkechen-panw/print-rnh
Donald Sharp [Mon, 16 Sep 2024 13:30:53 +0000 (09:30 -0400)]
Merge pull request #16828 from enkechen-panw/print-rnh

zebra: include the prefix in nht show command

7 months agotests: update isisd fuzz test
Louis Scalbert [Mon, 16 Sep 2024 11:43:26 +0000 (13:43 +0200)]
tests: update isisd fuzz test

Since the previous commit, if a router capability subTLV is not
readable, the previously read subTLVs are kept.

Update of the ISIS fuzz test.

> $ wuschl rebuild tests/isisd/test_fuzz_isis_tlv
> $ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h

> $ ./test_fuzz_isis_tlv 2>/dev/null | grep failed
> Test 139 failed, output differs.
> Test 150 failed, output differs.
> 2 of 405 tests failed.
>
> $ ./test_fuzz_isis_tlv 139 2>/dev/null
> Test 139 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Received output:
> Unpack log:
> Unpacking 564 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 193 and len 13.
>     Skipping unknown TLV 193 (13 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 0 and len 0.
>     Skipping unknown TLV 0 (0 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Router Capability: 253.212.128.242 , D:1, S:1
>
> $ ./test_fuzz_isis_tlv 150 2>/dev/null
> Test 150 failed, output differs.
> Expected output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Received output:
> Unpack log:
> Unpacking 403 bytes of TLVs...
>   Unpacking TLV...
>     Found TLV of type 129 and len 13.
>     Unpacking Protocols Supported TLV...
>       Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
>   Unpacking TLV...
>     Found TLV of type 11 and len 11.
>     Skipping unknown TLV 11 (11 bytes)
>   Unpacking TLV...
>     Found TLV of type 242 and len 12.
>     Unpacking Router Capability TLV...
>     WARNING: Router Capability subTLV length too large compared to expected size
> Unpacked TLVs:
> Protocols Supported: 73, 16, 255, 255, 255, 101, 10, 11, 11, 11, 11, 11, 11
> Router Capability: 253.212.128.242 , D:1, S:1

Link: https://pypi.org/project/wuschl/
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoisisd: fix rcap tlv double-free crash
Louis Scalbert [Thu, 12 Sep 2024 07:31:49 +0000 (09:31 +0200)]
isisd: fix rcap tlv double-free crash

A double-free crash happens when a subTLV of the "Router Capability"
TLV is not readable and a previous "Router Capability" TLV was read.

rcap was supposed to be freed later by isis_free_tlvs() ->
free_tlv_router_cap(). In 78774bbcd5 ("isisd: add isis flex-algo lsp
advertisement"), this was not the case because rcap was not saved to
tlvs->router_cap when the function returned early because of a subTLV
length issue.

Always set tlvs->router_cap to free the memory.

Note that this patch has the consequence that in case of subTLV error,
the previously read "Router Capability" subTLVs are kept in memory.

Fixes: 49efc80d34 ("isisd: Ensure rcap is freed in error case")
Fixes: 78774bbcd5 ("isisd: add isis flex-algo lsp advertisement")
Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoMerge pull request #16835 from cscarpitta/add-sid-structure-to-seg6local-nh
Donatas Abraitis [Mon, 16 Sep 2024 07:25:56 +0000 (10:25 +0300)]
Merge pull request #16835 from cscarpitta/add-sid-structure-to-seg6local-nh

bgpd, lib: Include SID structure in seg6local nexthop

7 months agobgpd: Include structure when removing End.DT46 SID
Carmine Scarpitta [Sun, 15 Sep 2024 16:56:48 +0000 (18:56 +0200)]
bgpd: Include structure when removing End.DT46 SID

Include SID structure information when removing an SRv6 End.DT46 SID
from the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Include structure when removing End.DT4/6 SID
Carmine Scarpitta [Sun, 15 Sep 2024 16:56:21 +0000 (18:56 +0200)]
bgpd: Include structure when removing End.DT4/6 SID

Include SID structure information when removing an SRv6 End.DT4 or End.DT6 SID
from the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Include structure when installing End.DT46 SID
Carmine Scarpitta [Sun, 15 Sep 2024 16:54:55 +0000 (18:54 +0200)]
bgpd: Include structure when installing End.DT46 SID

Include SID structure information when installing an SRv6 End.DT46 SID
in the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agobgpd: Include structure when installing End.DT4/6 SID
Carmine Scarpitta [Sun, 15 Sep 2024 16:53:35 +0000 (18:53 +0200)]
bgpd: Include structure when installing End.DT4/6 SID

Include SID structure information when installing an SRv6 End.DT6 or End.DT4 SID
in the forwarding plane.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agolib: Include SID structure in seg6local nexthop
Carmine Scarpitta [Sun, 15 Sep 2024 15:23:34 +0000 (17:23 +0200)]
lib: Include SID structure in seg6local nexthop

Include SID structure information in seg6local nexthop data structure.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agozebra: include the prefix in nht show command
Enke Chen [Sun, 15 Sep 2024 06:47:00 +0000 (23:47 -0700)]
zebra: include the prefix in nht show command

Include the prefix in "show ip nht" and "show ipv6 nht".

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
7 months agoMerge pull request #16827 from LabNConsulting/chopps/fix-on-error-with-xdist
Jafar Al-Gharaibeh [Sat, 14 Sep 2024 22:36:42 +0000 (17:36 -0500)]
Merge pull request #16827 from LabNConsulting/chopps/fix-on-error-with-xdist

improvements for xdist mode

7 months agoMerge pull request #16829 from Jafaral/vty-json
Donald Sharp [Sat, 14 Sep 2024 15:30:13 +0000 (11:30 -0400)]
Merge pull request #16829 from Jafaral/vty-json

pimd: use vty_json

7 months agotests: fix spawning shells/vtysh on error in xdist mode
Christian Hopps [Fri, 13 Sep 2024 23:27:38 +0000 (19:27 -0400)]
tests: fix spawning shells/vtysh on error in xdist mode

- Also fix the above and CLI when running in munet native mode

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agotests: update munet 0.14.14, 0.14.15
Christian Hopps [Sat, 14 Sep 2024 03:32:47 +0000 (23:32 -0400)]
tests: update munet 0.14.14, 0.14.15

- improvement to remote CLI
- 0.14.15 fixed a small bug in 0.14.14

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agopimd: use vty_json
Jafar Al-Gharaibeh [Sat, 14 Sep 2024 04:32:56 +0000 (23:32 -0500)]
pimd: use vty_json

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agotests: update munet 0.14.13
Christian Hopps [Sat, 14 Sep 2024 00:04:13 +0000 (20:04 -0400)]
tests: update munet 0.14.13

- Improve remote CLI operation [improves xdist mode]

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agotests: update munet 0.14.12
Christian Hopps [Fri, 13 Sep 2024 22:12:36 +0000 (18:12 -0400)]
tests: update munet 0.14.12

- Adds retry_sleep (i.e., interval) parameter to native @retry decorator
- Fix --stdout and --stderr munet CLI args

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agoMerge pull request #16438 from Jafaral/pim-10.1-cand-rp
Donald Sharp [Fri, 13 Sep 2024 23:45:57 +0000 (19:45 -0400)]
Merge pull request #16438 from Jafaral/pim-10.1-cand-rp

PIM candidate BSR/RP support

7 months agoMerge pull request #16818 from ak503/ospf_gr
Jafar Al-Gharaibeh [Fri, 13 Sep 2024 15:57:56 +0000 (11:57 -0400)]
Merge pull request #16818 from ak503/ospf_gr

ospfd: missing '[no]ip ospf graceful-restart hello-delay <N>' commands

7 months agoMerge pull request #16815 from opensourcerouting/fix/adjust_wait_count_default_timers...
Donald Sharp [Fri, 13 Sep 2024 15:27:19 +0000 (11:27 -0400)]
Merge pull request #16815 from opensourcerouting/fix/adjust_wait_count_default_timers_if_too_low

tests: Adjust minimum wait/count timers for run_and_expect() if they are too low

7 months agoMerge pull request #16808 from garyachy/nhrp_duplicate_authentication_extension_field
Jafar Al-Gharaibeh [Fri, 13 Sep 2024 14:50:40 +0000 (10:50 -0400)]
Merge pull request #16808 from garyachy/nhrp_duplicate_authentication_extension_field

nhrpd: fixes duplicate auth extension

7 months agoospfd: fix missing '[no]ip ospf graceful-restart hello-delay <N>' commands
Dmitrii Turlupov [Fri, 13 Sep 2024 13:22:18 +0000 (16:22 +0300)]
ospfd: fix missing '[no]ip ospf graceful-restart hello-delay <N>' commands

Signed-off-by: Dmitrii Turlupov <turlupov@bk.ru>
7 months agotests: Adjust minimum wait/count timers for run_and_expect() if they are too low
Donatas Abraitis [Fri, 13 Sep 2024 07:23:51 +0000 (10:23 +0300)]
tests: Adjust minimum wait/count timers for run_and_expect() if they are too low

If the developer pass way too low timers, we end up with most likely false-positive
situations for random tests under a high load of the system.

It would be better to fallback to the minimum default values for such a cases.

E.g.:

```
WARNING: topo: Waiting time is too small (count=1, wait=0.5), using default values (count=20, wait=3)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16779 from louis-6wind/fix-as-path-exclude
Donatas Abraitis [Fri, 13 Sep 2024 06:38:15 +0000 (09:38 +0300)]
Merge pull request #16779 from louis-6wind/fix-as-path-exclude

bgpd: fix as-path exclude modify crash

7 months agoMerge pull request #16792 from sri-mohan1/srib-24-frr-a
Donatas Abraitis [Fri, 13 Sep 2024 06:00:31 +0000 (09:00 +0300)]
Merge pull request #16792 from sri-mohan1/srib-24-frr-a

bgpd: changes for code maintainability

7 months agoMerge pull request #16799 from LabNConsulting/aceelindem/ospf-delay-reflooding-ack-fix
Donald Sharp [Thu, 12 Sep 2024 20:17:30 +0000 (16:17 -0400)]
Merge pull request #16799 from LabNConsulting/aceelindem/ospf-delay-reflooding-ack-fix

ospfd: An OSPF Ack should be sent when P2MP reflooding is delayed

7 months agoospfd: An OSPF Ack should be sent when P2MP reflooding is delayed.
Acee Lindem [Wed, 11 Sep 2024 16:41:41 +0000 (16:41 +0000)]
ospfd: An OSPF Ack should be sent when P2MP reflooding is delayed.

When "ip ospf network point-to-multipoint delayed-reflooding" is configured,
LSAs received on an OSPF P2MP network are not reflooded. Since LSA reflooding
would normally serve as an implied LSA acknowledgment, an explicit OSPF ack
should be sent to avoid retransmission by the neighbor which orginally flooded
the LSA on the P2MP network.

Signed-off-by: Acee Lindem <acee@lindem.com>
7 months agoMerge pull request #16807 from louis-6wind/fix-isis_lsp_bits_topo1-race
Mark Stapp [Thu, 12 Sep 2024 13:46:42 +0000 (09:46 -0400)]
Merge pull request #16807 from louis-6wind/fix-isis_lsp_bits_topo1-race

tests: fix isis_lsp_bits_topo1 race condition

7 months agoMerge pull request #16810 from anlancs/fix/pimd-interface-crash-commands
Donald Sharp [Thu, 12 Sep 2024 12:19:11 +0000 (08:19 -0400)]
Merge pull request #16810 from anlancs/fix/pimd-interface-crash-commands

pimd: fix crash for two commands

7 months agopimd: fix crash for two commands
anlan_cs [Thu, 12 Sep 2024 09:10:04 +0000 (17:10 +0800)]
pimd: fix crash for two commands

Need "pim-enable" the interface for the two commands, otherwise it will crash.

```
PIM: lib_interface_pim_address_family_bsm_modify+0x68     561aa37a406c     7ffcc7b4cbd0 /usr/lib/frr/pimd (mapped at 0x561aa3726000)
PIM: nb_callback_modify+0xdc            7f6200961aac     7ffcc7b4cc00 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_callback_configuration+0x14e     7f6200962740     7ffcc7b4cc90 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_transaction_process+0x68        7f6200962c79     7ffcc7b4d120 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_candidate_commit_apply+0x36     7f620096144f     7ffcc7b4d170 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_candidate_commit+0x96           7f6200961585     7ffcc7b4d1b0 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_cli_classic_commit+0x9e         7f6200967c4f     7ffcc7b4d200 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_cli_apply_changes_internal+0x1fd     7f62009681ef     7ffcc7b4f250 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: nb_cli_apply_changes+0x2a9         7f6200968554     7ffcc7b51290 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: pim_process_no_bsm_cmd+0x4a        561aa378b7b6     7ffcc7b51b90 /usr/lib/frr/pimd (mapped at 0x561aa3726000)
PIM: no_ip_pim_bsm+0x23                 561aa37d8487     7ffcc7b51bb0 /usr/lib/frr/pimd (mapped at 0x561aa3726000)
PIM: cmd_execute_command_real+0x35a     7f62008f83c6     7ffcc7b51be0 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: cmd_execute_command+0x12f          7f62008f8527     7ffcc7b51c70 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: cmd_execute+0x95                   7f62008f8a75     7ffcc7b51cd0 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: vty_command+0x1b8                  7f62009b621a     7ffcc7b51d20 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: vty_execute+0x59                   7f62009b7fb3     7ffcc7b53db0 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: vtysh_read+0x1f6                   7f62009ba136     7ffcc7b53de0 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: event_call+0xd6                    7f62009af5df     7ffcc7b54040 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: frr_run+0x240                      7f6200935177     7ffcc7b54100 /usr/lib/x86_64-linux-gnu/frr/libfrr.so.0 (mapped at 0x7f6200864000)
PIM: main+0x12e                         561aa37e7950     7ffcc7b54210 /usr/lib/frr/pimd (mapped at 0x561aa3726000)
PIM: __libc_start_main+0xea             7f6200681d0a     7ffcc7b54250 /lib/x86_64-linux-gnu/libc.so.6 (mapped at 0x7f620065b000)
PIM: _start+0x2a                        561aa377c42a     7ffcc7b54320 /usr/lib/frr/pimd (mapped at 0x561aa3726000)
```

Signed-off-by: anlan_cs <anlan_cs@tom.com>
7 months agonhrpd: fixes duplicate auth extension
Denys Haryachyy [Thu, 12 Sep 2024 07:28:28 +0000 (07:28 +0000)]
nhrpd: fixes duplicate auth extension

When an NHRP peer was forwarding a message, it was copying all
extensions from the originally received packet. The authentication
extension must be regenerated hop by hop per RFC2332.
This fix checks for the auth extension when copying extensions
and omits the original packet auth and instead regenerates a new auth extension.

Fix bug #16507

Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
7 months agotests: fix isis_lsp_bits_topo1 race condition
Louis Scalbert [Thu, 12 Sep 2024 07:14:02 +0000 (09:14 +0200)]
tests: fix isis_lsp_bits_topo1 race condition

Level 2 adjacency list is not supposed to be always set.

> #0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007f9f0353274f in core_handler (signo=6, siginfo=0x7ffe95260770, context=0x7ffe95260640) at lib/sigevent.c:258
> #2  <signal handler called>
> #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #4  0x00007f9f0324e537 in __GI_abort () at abort.c:79
> #5  0x00007f9f035744ea in _zlog_assert_failed (xref=0x7f9f0362c6c0 <_xref.15>, extra=0x0) at lib/zlog.c:789
> #6  0x00007f9f034d25ee in listnode_head (list=0x0) at lib/linklist.c:316
> #7  0x000055cd65aaa481 in lib_interface_state_isis_adjacencies_adjacency_get_next (args=0x7ffe95261730) at isisd/isis_nb_state.c:101
> #8  0x00007f9f034feadd in nb_callback_get_next (nb_node=0x55cd673c0190, parent_list_entry=0x55cd67570d30, list_entry=0x55cd6758f8a0) at lib/northbound.c:1748
> #9  0x00007f9f0350bf07 in __walk (ys=0x55cd675782b0, is_resume=false) at lib/northbound_oper.c:1264
> #10 0x00007f9f0350deaa in nb_op_walk_start (ys=0x55cd675782b0) at lib/northbound_oper.c:1741
> #11 0x00007f9f0350e079 in nb_oper_iterate_legacy (xpath=0x55cd67595c60 "/frr-interface:lib", translator=0x0, flags=0, cb=0x0, cb_arg=0x0, tree=0x7ffe952621b0) at lib/northbound_oper.c:1803
> #12 0x00007f9f03507661 in show_yang_operational_data_magic (self=0x7f9f03634a80 <show_yang_operational_data_cmd>, vty=0x55cd675a61f0, argc=4, argv=0x55cd6758eab0,
>     xpath=0x55cd67595c60 "/frr-interface:lib", json=0x0, xml=0x0, translator_family=0x0, with_config=0x0) at lib/northbound_cli.c:1576
> #13 0x00007f9f035037f0 in show_yang_operational_data (self=0x7f9f03634a80 <show_yang_operational_data_cmd>, vty=0x55cd675a61f0, argc=4, argv=0x55cd6758eab0)
>     at ./lib/northbound_cli_clippy.c:906
> #14 0x00007f9f0349435d in cmd_execute_command_real (vline=0x55cd6758e490, vty=0x55cd675a61f0, cmd=0x0, up_level=0) at lib/command.c:1003
> #15 0x00007f9f03494477 in cmd_execute_command (vline=0x55cd67585340, vty=0x55cd675a61f0, cmd=0x0, vtysh=0) at lib/command.c:1053
> #16 0x00007f9f03494a0c in cmd_execute (vty=0x55cd675a61f0, cmd=0x55cd67579040 "do show yang operational-data /frr-interface:lib", matched=0x0, vtysh=0) at lib/command.c:1228
> #17 0x00007f9f0355239d in vty_command (vty=0x55cd675a61f0, buf=0x55cd67579040 "do show yang operational-data /frr-interface:lib") at lib/vty.c:625
> #18 0x00007f9f03554136 in vty_execute (vty=0x55cd675a61f0) at lib/vty.c:1388
> #19 0x00007f9f0355634c in vtysh_read (thread=0x7ffe952647a0) at lib/vty.c:2400
> #20 0x00007f9f0354b6f6 in event_call (thread=0x7ffe952647a0) at lib/event.c:1996
> #21 0x00007f9f034d1365 in frr_run (master=0x55cd67204da0) at lib/libfrr.c:1231
> #22 0x000055cd65a3236e in main (argc=7, argv=0x7ffe952649c8, envp=0x7ffe95264a08) at isisd/isis_main.c:354

Fixes: 2a1c520e9f ("isisd: split northbound callbacks into multiple files")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoMerge pull request #16798 from donaldsharp/zebra_more_vrf_debug_data
Donatas Abraitis [Thu, 12 Sep 2024 06:23:30 +0000 (09:23 +0300)]
Merge pull request #16798 from donaldsharp/zebra_more_vrf_debug_data

zebra: Add more vrf name to debugs

7 months agobgpd: changes for code maintainability
sri-mohan1 [Wed, 11 Sep 2024 05:52:47 +0000 (11:22 +0530)]
bgpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
7 months agobgpd: Remove check for bgp pointer
Donald Sharp [Mon, 9 Sep 2024 15:11:33 +0000 (11:11 -0400)]
bgpd: Remove check for bgp pointer

The check for an equivalent bgp pointer makes no sense
in the context of the workqueue as that we have a
work queue per bgp process, as such the bgp pointer
will always be the same as the pqnode.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agobgpd: Allow BGP to process certain routes early
Donald Sharp [Mon, 9 Sep 2024 14:26:13 +0000 (10:26 -0400)]
bgpd: Allow BGP to process certain routes early

There is a need to be able to process certain bgp
routes earlier than others.  Especially when there
is major trauma going on in the network.  Start
the ability for this to happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: Add more vrf name to debugs
Donald Sharp [Wed, 3 Jul 2024 14:29:21 +0000 (10:29 -0400)]
zebra: Add more vrf name to debugs

Trying to debug some cross vrf stuff in zebra and frankly
it's hard to grep the file for the routes you are interested
in.  Let's clean this up some and get a bit better
information for us developers

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16789 from mjstapp/doc_dev_update
Jafar Al-Gharaibeh [Wed, 11 Sep 2024 16:52:50 +0000 (12:52 -0400)]
Merge pull request #16789 from mjstapp/doc_dev_update

doc: add some text about using git forks

7 months agotests: bgp_set_aspath_exclude extend timers
Louis Scalbert [Wed, 11 Sep 2024 16:02:52 +0000 (18:02 +0200)]
tests: bgp_set_aspath_exclude extend timers

Extend timers in bgp_set_aspath_exclude in case of high load on the CI.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agotests: bgp_set_aspath_exclude check rule modif
Louis Scalbert [Tue, 10 Sep 2024 13:10:26 +0000 (15:10 +0200)]
tests: bgp_set_aspath_exclude check rule modif

No need to do 'no set as-path exclude' to replace the current rule by
another. The code is supposed to support the replacement.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agodoc: add some text about git forks
Mark Stapp [Tue, 10 Sep 2024 19:29:12 +0000 (15:29 -0400)]
doc: add some text about git forks

Add some general guidance about creating and using a fork
of the FRR repository to the workflow doc.

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agodoc: fix several warnings in dev docs
Mark Stapp [Tue, 10 Sep 2024 19:21:03 +0000 (15:21 -0400)]
doc: fix several warnings in dev docs

Clean up several sphinx warnings in the dev docs:
add bmp to bgp TOC; fix some indenting; escape some asterisks.

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agoMerge pull request #16718 from louis-6wind/fix-asla-length
Olivier Dugeon [Tue, 10 Sep 2024 14:48:39 +0000 (16:48 +0200)]
Merge pull request #16718 from louis-6wind/fix-asla-length

isisd: fix crash when reading asla

7 months agoMerge pull request #16778 from aapostoliuk/16628-master
Russ White [Tue, 10 Sep 2024 14:24:17 +0000 (10:24 -0400)]
Merge pull request #16778 from aapostoliuk/16628-master

nhrpd: Added a command "no tunnel protection vici profile PROFILE"

7 months agoMerge pull request #16772 from louis-6wind/fix-isis-affinity
Russ White [Tue, 10 Sep 2024 14:20:53 +0000 (10:20 -0400)]
Merge pull request #16772 from louis-6wind/fix-isis-affinity

isisd: fix crash at flex-algo affinity setting

7 months agoMerge pull request #16759 from lsang6WIND/ospf_log
Russ White [Tue, 10 Sep 2024 14:18:22 +0000 (10:18 -0400)]
Merge pull request #16759 from lsang6WIND/ospf_log

ospfd: logging behavior for area id mismatches

7 months agoMerge pull request #16748 from opensourcerouting/fix/issue_12502
Russ White [Tue, 10 Sep 2024 14:17:24 +0000 (10:17 -0400)]
Merge pull request #16748 from opensourcerouting/fix/issue_12502

bgpd: Validate imported routes next-hop that is in a default VRF

7 months agoMerge pull request #15259 from dmytroshytyi-6WIND/nexthop_resolution
Russ White [Tue, 10 Sep 2024 14:04:08 +0000 (10:04 -0400)]
Merge pull request #15259 from dmytroshytyi-6WIND/nexthop_resolution

zebra: add LSP entry to nexthop via recursive (part 2)

7 months agotests: bgp_set_aspath_exclude check rule modif crash
Louis Scalbert [Tue, 10 Sep 2024 13:10:26 +0000 (15:10 +0200)]
tests: bgp_set_aspath_exclude check rule modif crash

Check that the following does not cause a crash:

> route-map r2 permit 6
>  set as-path exclude 65555
>  set as-path exclude as-path-access-list NON-EXISTING

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agobgpd: fix as-path exclude modify crash
Louis Scalbert [Tue, 10 Sep 2024 12:06:38 +0000 (14:06 +0200)]
bgpd: fix as-path exclude modify crash

Fix a crash when modifying a route-map with set as-path exclude without
as-path-access-list:

> router(config)# route-map routemaptest deny 1
> router(config-route-map)# set as-path exclude 33 34 35
> router(config-route-map)# set as-path exclude as-path-access-list test

> #0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007fb3959327de in core_handler (signo=11, siginfo=0x7ffd122da530, context=0x7ffd122da400) at lib/sigevent.c:258
> #2  <signal handler called>
> #3  0x000055ab2762a1bd in as_list_list_del (h=0x55ab27897680 <as_exclude_list_orphan>, item=0x55ab28204e20) at ./bgpd/bgp_aspath.h:77
> #4  0x000055ab2762d1a8 in as_exclude_remove_orphan (ase=0x55ab28204e20) at bgpd/bgp_aspath.c:1574
> #5  0x000055ab27550538 in route_aspath_exclude_free (rule=0x55ab28204e20) at bgpd/bgp_routemap.c:2366
> #6  0x00007fb39591f00c in route_map_rule_delete (list=0x55ab28203498, rule=0x55ab28204170) at lib/routemap.c:1357
> #7  0x00007fb39591f87c in route_map_add_set (index=0x55ab28203460, set_name=0x55ab276ad2aa "as-path exclude", set_arg=0x55ab281e4f70 "as-path-access-list test") at lib/routemap.c:1674
> #8  0x00007fb39591d3f3 in generic_set_add (index=0x55ab28203460, command=0x55ab276ad2aa "as-path exclude", arg=0x55ab281e4f70 "as-path-access-list test", errmsg=0x7ffd122db870 "",
>     errmsg_len=8192) at lib/routemap.c:533
> #9  0x000055ab2755e78e in lib_route_map_entry_set_action_rmap_set_action_exclude_as_path_modify (args=0x7ffd122db290) at bgpd/bgp_routemap_nb_config.c:2427
> #10 0x00007fb3958fe417 in nb_callback_modify (context=0x55ab28205aa0, nb_node=0x55ab27cb31e0, event=NB_EV_APPLY, dnode=0x55ab28202690, resource=0x55ab27c32148, errmsg=0x7ffd122db870 "",
>     errmsg_len=8192) at lib/northbound.c:1538
> #11 0x00007fb3958ff0ab in nb_callback_configuration (context=0x55ab28205aa0, event=NB_EV_APPLY, change=0x55ab27c32110, errmsg=0x7ffd122db870 "", errmsg_len=8192) at lib/northbound.c:1888
> #12 0x00007fb3958ff5e4 in nb_transaction_process (event=NB_EV_APPLY, transaction=0x55ab28205aa0, errmsg=0x7ffd122db870 "", errmsg_len=8192) at lib/northbound.c:2016
> #13 0x00007fb3958fddba in nb_candidate_commit_apply (transaction=0x55ab28205aa0, save_transaction=true, transaction_id=0x0, errmsg=0x7ffd122db870 "", errmsg_len=8192)
>     at lib/northbound.c:1356
> #14 0x00007fb3958fdef0 in nb_candidate_commit (context=..., candidate=0x55ab27c2c9a0, save_transaction=true, comment=0x0, transaction_id=0x0, errmsg=0x7ffd122db870 "", errmsg_len=8192)
>     at lib/northbound.c:1389
> #15 0x00007fb3959045ba in nb_cli_classic_commit (vty=0x55ab281f6680) at lib/northbound_cli.c:57
> #16 0x00007fb395904b5a in nb_cli_apply_changes_internal (vty=0x55ab281f6680, xpath_base=0x7ffd122dfd10 "/frr-route-map:lib/route-map[name='routemaptest']/entry[sequence='1']",
>     clear_pending=false) at lib/northbound_cli.c:184
> #17 0x00007fb395904ebf in nb_cli_apply_changes (vty=0x55ab281f6680, xpath_base_fmt=0x0) at lib/northbound_cli.c:240
> --Type <RET> for more, q to quit, c to continue without paging--
> #18 0x000055ab27557d2e in set_aspath_exclude_access_list_magic (self=0x55ab2775c300 <set_aspath_exclude_access_list_cmd>, vty=0x55ab281f6680, argc=5, argv=0x55ab28204c80,
>     as_path_filter_name=0x55ab28202040 "test") at bgpd/bgp_routemap.c:6397
> #19 0x000055ab2754bdea in set_aspath_exclude_access_list (self=0x55ab2775c300 <set_aspath_exclude_access_list_cmd>, vty=0x55ab281f6680, argc=5, argv=0x55ab28204c80)
>     at ./bgpd/bgp_routemap_clippy.c:856
> #20 0x00007fb39589435d in cmd_execute_command_real (vline=0x55ab281e61f0, vty=0x55ab281f6680, cmd=0x0, up_level=0) at lib/command.c:1003
> #21 0x00007fb3958944be in cmd_execute_command (vline=0x55ab281e61f0, vty=0x55ab281f6680, cmd=0x0, vtysh=0) at lib/command.c:1062
> #22 0x00007fb395894a0c in cmd_execute (vty=0x55ab281f6680, cmd=0x55ab28200f20 "set as-path exclude as-path-access-list test", matched=0x0, vtysh=0) at lib/command.c:1228
> #23 0x00007fb39595242c in vty_command (vty=0x55ab281f6680, buf=0x55ab28200f20 "set as-path exclude as-path-access-list test") at lib/vty.c:625
> #24 0x00007fb3959541c5 in vty_execute (vty=0x55ab281f6680) at lib/vty.c:1388
> #25 0x00007fb3959563db in vtysh_read (thread=0x7ffd122e2bb0) at lib/vty.c:2400
> #26 0x00007fb39594b785 in event_call (thread=0x7ffd122e2bb0) at lib/event.c:1996
> #27 0x00007fb3958d1365 in frr_run (master=0x55ab27b56d70) at lib/libfrr.c:1231
> #28 0x000055ab2747f1cc in main (argc=3, argv=0x7ffd122e2e08) at bgpd/bgp_main.c:555

Fixes: 094dcc3cda ("bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agonhrpd: Added a command "no tunnel protection vici profile PROFILE"
aapostoliuk [Thu, 5 Sep 2024 15:37:27 +0000 (18:37 +0300)]
nhrpd: Added a command "no tunnel protection vici profile PROFILE"

For compatibility with frr-reload, a command
"no tunnel protection [vici profile PROFILE [fallback-profile FALLBACK]]"
was added.

Signed-off-by: aapostoliuk <a.apostoliuk@vyos.io>
7 months agoMerge pull request #16768 from sri-mohan1/srib-24-frr-a
Donatas Abraitis [Tue, 10 Sep 2024 11:33:56 +0000 (14:33 +0300)]
Merge pull request #16768 from sri-mohan1/srib-24-frr-a

bgpd: changes for code maintainability

7 months agobgpd: changes for code maintainability
sri-mohan1 [Mon, 9 Sep 2024 04:16:16 +0000 (09:46 +0530)]
bgpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
7 months agoMerge pull request #16777 from LabNConsulting/chopps/pytest-config-update
Jafar Al-Gharaibeh [Tue, 10 Sep 2024 00:48:05 +0000 (20:48 -0400)]
Merge pull request #16777 from LabNConsulting/chopps/pytest-config-update

tests: add asyncio default config param to quiet warning

7 months agotests: don't set oif to a list if it is None
Jafar Al-Gharaibeh [Mon, 9 Sep 2024 17:42:06 +0000 (12:42 -0500)]
tests: don't set oif to a list if it is None

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agopimd: make sure the bsr message is coming from the neighbor
Jafar Al-Gharaibeh [Fri, 6 Sep 2024 14:57:53 +0000 (09:57 -0500)]
pimd: make sure the bsr message is coming from the neighbor

This change re-adds an additional check bsr rpf that was removed
in 2c6a32f9be3c687fe5c52d055f21912da8364ec6.

Without that check, bsr messages is resent (causing a loop) if we
have more than one pim neighbor on a link.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agotests: add candidate BSR/RP topotest
Jafar Al-Gharaibeh [Tue, 23 Jul 2024 05:57:24 +0000 (00:57 -0500)]
tests: add candidate BSR/RP topotest

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agotests: add asyncio default config param to quiet warning
Christian Hopps [Mon, 9 Sep 2024 20:34:08 +0000 (16:34 -0400)]
tests: add asyncio default config param to quiet warning

Update the topotest doc to the latest pytest* pkg versions
known to work together

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agodoc: new PIM candidate BSR/RP commands
Jafar Al-Gharaibeh [Tue, 23 Jul 2024 05:57:16 +0000 (00:57 -0500)]
doc: new PIM candidate BSR/RP commands

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agopimd: refactor pim_sock_read to be used with unicast bsr msgs
Jafar Al-Gharaibeh [Thu, 29 Aug 2024 05:10:36 +0000 (00:10 -0500)]
pimd: refactor pim_sock_read to be used with unicast bsr msgs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agopimd: candidate BSR/RP show commands, move under ip pim bsr
Jafar Al-Gharaibeh [Tue, 23 Jul 2024 05:57:08 +0000 (00:57 -0500)]
pimd: candidate BSR/RP show commands, move under ip pim bsr

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agopimd: Candidate-BSR support
Jafar Al-Gharaibeh [Fri, 26 Jul 2024 14:57:44 +0000 (09:57 -0500)]
pimd: Candidate-BSR support

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agopimd: Candidate-RP support
Jafar Al-Gharaibeh [Tue, 23 Jul 2024 05:45:02 +0000 (00:45 -0500)]
pimd: Candidate-RP support

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
7 months agoisisd: fix flex-algo northbound configuration
Louis Scalbert [Mon, 9 Sep 2024 12:32:00 +0000 (14:32 +0200)]
isisd: fix flex-algo northbound configuration

ISIS flex-algo cannot be configured in the same northbound transaction.

> # cat config3
> router isis 1
>  flex-algo 129
>   priority 128
>
> # vtysh -f config3
> % Configuration failed.
>
> Error type: validation
> The following commands were dynamically grouped into the same transaction and rejected:
> - router isis 1
> - flex-algo 129
> - priority 128
> [1523430|isisd] done

Do not check data presence in running datastore in validation state.

Fixes: 893882ee20 ("isisd: add isis flex-algo configuration backend")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoisisd: avoid nb_running_get_entry during validation
Louis Scalbert [Mon, 9 Sep 2024 11:09:49 +0000 (13:09 +0200)]
isisd: avoid nb_running_get_entry during validation

Avoid calling nb_running_get_entry() during northbound validation.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoisisd: fix flex-algo affinity setting
Louis Scalbert [Mon, 9 Sep 2024 10:39:16 +0000 (12:39 +0200)]
isisd: fix flex-algo affinity setting

The following causes a validation error.

> # cat config
> affinity-map green bit-position 0
> router isis 1
>  flex-algo 129
>   affinity exclude-any green
> # vtysh -f config

> Error type: validation
> Error description: affinity map green isn't found
> The following commands were dynamically grouped into the same transaction and rejected:
> - affinity-map green bit-position 0
> - router isis 1
> -  flex-algo 129
> -   affinity exclude-any green

Data does not exist in memory in validation state.

Get data from the candidate northbound config instead.

Fixes: 893882ee20 ("isisd: add isis flex-algo configuration backend")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoisisd: fix crash at flex-algo affinity setting
Louis Scalbert [Mon, 9 Sep 2024 10:47:02 +0000 (12:47 +0200)]
isisd: fix crash at flex-algo affinity setting

The following causes a isisd crash.

> # cat config
> affinity-map green bit-position 0
> router isis 1
>  flex-algo 129
>   affinity exclude-any green
> # vtysh -f config

> #0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007f650cd32756 in core_handler (signo=6, siginfo=0x7ffc56f93070, context=0x7ffc56f92f40) at lib/sigevent.c:258
> #2  <signal handler called>
> #3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #4  0x00007f650c91c537 in __GI_abort () at abort.c:79
> #5  0x00007f650cd007c9 in nb_running_get_entry_worker (dnode=0x0, xpath=0x0, abort_if_not_found=true, rec_search=true) at lib/northbound.c:2531
> #6  0x00007f650cd007f9 in nb_running_get_entry (dnode=0x55d9ad406e00, xpath=0x0, abort_if_not_found=true) at lib/northbound.c:2537
> #7  0x000055d9ab302248 in isis_instance_flex_algo_affinity_set (args=0x7ffc56f947a0, type=2) at isisd/isis_nb_config.c:2998
> #8  0x000055d9ab3027c0 in isis_instance_flex_algo_affinity_exclude_any_create (args=0x7ffc56f947a0) at isisd/isis_nb_config.c:3155
> #9  0x00007f650ccfe284 in nb_callback_create (context=0x7ffc56f94d20, nb_node=0x55d9ad28b540, event=NB_EV_VALIDATE, dnode=0x55d9ad406e00, resource=0x0, errmsg=0x7ffc56f94de0 "",
>     errmsg_len=8192) at lib/northbound.c:1487
> #10 0x00007f650ccff067 in nb_callback_configuration (context=0x7ffc56f94d20, event=NB_EV_VALIDATE, change=0x55d9ad406d40, errmsg=0x7ffc56f94de0 "", errmsg_len=8192) at lib/northbound.c:1884
> #11 0x00007f650ccfda31 in nb_candidate_validate_code (context=0x7ffc56f94d20, candidate=0x55d9ad20d710, changes=0x7ffc56f94d38, errmsg=0x7ffc56f94de0 "", errmsg_len=8192)
>     at lib/northbound.c:1246
> #12 0x00007f650ccfdc67 in nb_candidate_commit_prepare (context=..., candidate=0x55d9ad20d710, comment=0x0, transaction=0x7ffc56f94da0, skip_validate=false, ignore_zero_change=false,
>     errmsg=0x7ffc56f94de0 "", errmsg_len=8192) at lib/northbound.c:1317
> #13 0x00007f650ccfdec4 in nb_candidate_commit (context=..., candidate=0x55d9ad20d710, save_transaction=true, comment=0x0, transaction_id=0x0, errmsg=0x7ffc56f94de0 "", errmsg_len=8192)
>     at lib/northbound.c:1381
> #14 0x00007f650cd045ba in nb_cli_classic_commit (vty=0x55d9ad3f7490) at lib/northbound_cli.c:57
> #15 0x00007f650cd04749 in nb_cli_pending_commit_check (vty=0x55d9ad3f7490) at lib/northbound_cli.c:96
> #16 0x00007f650cc94340 in cmd_execute_command_real (vline=0x55d9ad3eea10, vty=0x55d9ad3f7490, cmd=0x0, up_level=0) at lib/command.c:1000
> #17 0x00007f650cc94599 in cmd_execute_command (vline=0x55d9ad3eea10, vty=0x55d9ad3f7490, cmd=0x0, vtysh=0) at lib/command.c:1080
> #18 0x00007f650cc94a0c in cmd_execute (vty=0x55d9ad3f7490, cmd=0x55d9ad401d30 "XFRR_end_configuration", matched=0x0, vtysh=0) at lib/command.c:1228
> #19 0x00007f650cd523a4 in vty_command (vty=0x55d9ad3f7490, buf=0x55d9ad401d30 "XFRR_end_configuration") at lib/vty.c:625
> #20 0x00007f650cd5413d in vty_execute (vty=0x55d9ad3f7490) at lib/vty.c:1388
> #21 0x00007f650cd56353 in vtysh_read (thread=0x7ffc56f99370) at lib/vty.c:2400
> #22 0x00007f650cd4b6fd in event_call (thread=0x7ffc56f99370) at lib/event.c:1996
> #23 0x00007f650ccd1365 in frr_run (master=0x55d9ad103cf0) at lib/libfrr.c:1231
> #24 0x000055d9ab29036e in main (argc=2, argv=0x7ffc56f99598, envp=0x7ffc56f995b0) at isisd/isis_main.c:354

Configuring the same in vtysh configure interactive mode works properly.
When using "vtysh -f", the northbound compatible configuration is
committed together whereas, in interactive mode, it committed line by
line. In the first situation, in validation state nb_running_get_entry()
fails because the area not yet in running.

Do not use nb_running_get_entry() northbound validation state.

Fixes: 893882ee20 ("isisd: add isis flex-algo configuration backend")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoospfd: logging behavior for area id mismatches
Loïc Sang [Fri, 6 Sep 2024 08:51:30 +0000 (10:51 +0200)]
ospfd: logging behavior for area id mismatches

When an ospf interface is not in the backbone area, but it receives a
packet from the backbone, no logs are generated for this mismatch.
However, the opposite scenario does generate logs.
Add a log for this case.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
7 months agoMerge pull request #16764 from LabNConsulting/chopps/fix-clang-sa-warning
Donald Sharp [Mon, 9 Sep 2024 00:06:26 +0000 (20:06 -0400)]
Merge pull request #16764 from LabNConsulting/chopps/fix-clang-sa-warning

lib: fix clang SA warnings

7 months agoMerge pull request #15679 from cscarpitta/test-srv6-sid-manager
Russ White [Sun, 8 Sep 2024 19:09:50 +0000 (15:09 -0400)]
Merge pull request #15679 from cscarpitta/test-srv6-sid-manager

tests: Add topotest to validate the sharing of an SRv6 locator among multiple protocols

7 months agoMerge pull request #16756 from sri-mohan1/srib-24-frr-a
Donatas Abraitis [Sun, 8 Sep 2024 17:42:59 +0000 (20:42 +0300)]
Merge pull request #16756 from sri-mohan1/srib-24-frr-a

bgpd: changes for code maintainability

7 months agolib: fix clang SA warnings
Christian Hopps [Sun, 8 Sep 2024 02:12:03 +0000 (22:12 -0400)]
lib: fix clang SA warnings

Also, cleanup some unreachable code in `nb_op_sib_next()`.

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agoMerge pull request #16762 from LabNConsulting/chopps/diag-diff
Jafar Al-Gharaibeh [Sat, 7 Sep 2024 18:30:24 +0000 (14:30 -0400)]
Merge pull request #16762 from LabNConsulting/chopps/diag-diff

improve @retry decorator

7 months agotests: log json diff output at debug level while retrying
Christian Hopps [Sat, 7 Sep 2024 11:12:05 +0000 (07:12 -0400)]
tests: log json diff output at debug level while retrying

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agotests: optionally pass `seconds_left` to retrying functions
Christian Hopps [Sat, 7 Sep 2024 11:09:27 +0000 (07:09 -0400)]
tests: optionally pass `seconds_left` to retrying functions

This allows retrying functions to possibly change their logging level
for diagnostics.

In order to maintain backward compatibility with this longstanding
function we catch the specific exception of it not being handled by the
retrying function and call again w/o the argument.

Signed-off-by: Christian Hopps <chopps@labn.net>
7 months agotests: Add SRv6 SID Manager mem leak testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:05:07 +0000 (23:05 +0200)]
tests: Add SRv6 SID Manager mem leak testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager ping testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:04:52 +0000 (23:04 +0200)]
tests: Add SRv6 SID Manager ping testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager VPN RIB testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:04:39 +0000 (23:04 +0200)]
tests: Add SRv6 SID Manager VPN RIB testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager SRv6 loc testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:04:22 +0000 (23:04 +0200)]
tests: Add SRv6 SID Manager SRv6 loc testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager RIB IPv6 testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:04:02 +0000 (23:04 +0200)]
tests: Add SRv6 SID Manager RIB IPv6 testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager RIB IPv4 testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:03:34 +0000 (23:03 +0200)]
tests: Add SRv6 SID Manager RIB IPv4 testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add SRv6 SID Manager ISIS adj testcase
Carmine Scarpitta [Fri, 6 Sep 2024 21:03:03 +0000 (23:03 +0200)]
tests: Add SRv6 SID Manager ISIS adj testcase

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>