]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
11 months agotests: Check if dampening per-peer works
Donatas Abraitis [Tue, 30 Apr 2024 09:14:23 +0000 (12:14 +0300)]
tests: Check if dampening per-peer works

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agodoc: user doc for route-flap dampening commands
David Schweizer [Tue, 30 Apr 2024 08:15:40 +0000 (11:15 +0300)]
doc: user doc for route-flap dampening commands

Changes update the user documentation to include a description of the
now available commands to enable/disable route-flap dampening for peers
and peer groups.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: Put dest into work queue when the path is really withdrawn by dampening
Donatas Abraitis [Wed, 24 Apr 2024 14:13:48 +0000 (17:13 +0300)]
bgpd: Put dest into work queue when the path is really withdrawn by dampening

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: Pass the right reuse_list when handling it via bgp_reuse_timer thread
Donatas Abraitis [Wed, 24 Apr 2024 13:59:25 +0000 (16:59 +0300)]
bgpd: Pass the right reuse_list when handling it via bgp_reuse_timer thread

This fixes the crash:

```
==14759== Invalid read of size 8
==14759==    at 0x31032B: bgp_reuselist_del (bgp_damp.c:51)
==14759==    by 0x310392: bgp_damp_info_unclaim (bgp_damp.c:69)
==14759==    by 0x310CD6: bgp_damp_info_free (bgp_damp.c:387)
==14759==    by 0x311016: bgp_reuse_timer (bgp_damp.c:230)
==14759==    by 0x4F227CC: thread_call (thread.c:2008)
==14759==    by 0x4EDB7D7: frr_run (libfrr.c:1216)
==14759==    by 0x1EF748: main (bgp_main.c:525)
==14759==  Address 0x48 is not stack'd, malloc'd or (recently) free'd
==14759==
==14759==
==14759== Process terminating with default action of signal 11 (SIGSEGV)
==14759==    at 0x59CC7F5: raise (raise.c:46)
==14759==    by 0x4F10CEB: core_handler (sigevent.c:261)
==14759==    by 0x59CC97F: ??? (in /lib/x86_64-linux-gnu/libpthread-2.27.so)
==14759==    by 0x31032A: bgp_reuselist_del (bgp_damp.c:51)
==14759==    by 0x310392: bgp_damp_info_unclaim (bgp_damp.c:69)
==14759==    by 0x310CD6: bgp_damp_info_free (bgp_damp.c:387)
==14759==    by 0x311016: bgp_reuse_timer (bgp_damp.c:230)
==14759==    by 0x4F227CC: thread_call (thread.c:2008)
==14759==    by 0x4EDB7D7: frr_run (libfrr.c:1216)
==14759==    by 0x1EF748: main (bgp_main.c:525)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: Use SLIST_FOREACH_SAFE when iterating over the list in bgp_reuse_timer
Donatas Abraitis [Wed, 24 Apr 2024 13:42:08 +0000 (16:42 +0300)]
bgpd: Use SLIST_FOREACH_SAFE when iterating over the list in bgp_reuse_timer

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: fix missing damp info free when cleaning bgp path
Igor Ryzhov [Wed, 28 Jul 2021 22:54:03 +0000 (01:54 +0300)]
bgpd: fix missing damp info free when cleaning bgp path

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
11 months agobgpd: cleanup bgp_damp_info_free
Igor Ryzhov [Tue, 30 Apr 2024 07:56:33 +0000 (10:56 +0300)]
bgpd: cleanup bgp_damp_info_free

bgp_damp_config, afi and safi are never used.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: fix incorrect usage of slist in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:17:50 +0000 (01:17 +0300)]
bgpd: fix incorrect usage of slist in dampening

Current code is a complete misuse of SLIST structure. Instead of just
adding a SLIST_ENTRY to struct bgp_damp_info, it allocates a separate
structure to be a node in the list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
11 months agobgpd: fix missing list add in dampening
Igor Ryzhov [Thu, 29 Jul 2021 11:42:16 +0000 (14:42 +0300)]
bgpd: fix missing list add in dampening

One more crash in dampening code...

When bgp_damp_withdraw is called, if there's already a BDI structure,
bgp_damp_info_claim is called to re-assign the bdi->config in case it
was changed. The problem is that bgp_damp_info_claim actually removes
the BDI from the reuse list of the old config and never adds it to the
reuse list of the new config. We must do this to prevent the crash
because all the code assumes that BDI is always in some list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
11 months agobgpd: Drop double-pointer for bgp_damp_info_free()
Donatas Abraitis [Tue, 30 Apr 2024 07:52:46 +0000 (10:52 +0300)]
bgpd: Drop double-pointer for bgp_damp_info_free()

This causes a crash using `clear ip bgp dampening <prefix>`.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
11 months agobgpd: fix double free in dampening code
Igor Ryzhov [Wed, 28 Jul 2021 21:14:31 +0000 (00:14 +0300)]
bgpd: fix double free in dampening code

bgp_damp_info_unclaim already calls bgp_reuselist_del. We must not call
it again here.

Fixes #9046.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
11 months agobgpd: Remove useless reuselist_node assignment before while loop
Donatas Abraitis [Fri, 11 Jun 2021 15:09:05 +0000 (18:09 +0300)]
bgpd: Remove useless reuselist_node assignment before while loop

Seems really not necessary pointing to initial value before while loop, where
it's assigned anyway.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
11 months agobgpd: clear ip bgp dampening was not triggering the route calculation for the prefix
sudhanshukumar22 [Tue, 3 Nov 2020 06:36:31 +0000 (22:36 -0800)]
bgpd: clear ip bgp dampening was not triggering the route calculation for the prefix

Description:
    clear ip bgp dampening was not triggering the route
    calculation for the prefix, Due to this prefix are not install in
    RIB(Zebra) and not adv to neighbor

Problem Description/Summary :
    clear ip bgp dampening was not triggering the route
    calculation for the prefix, Due to this prefix are not install in
    RIB(Zebra) and not adv to neighbor

    Fix: When clear ip bgp dampening, route are put for route-calculation as
    that it is install in the Zebra and adv to neighbor.

Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
11 months agobgpd: Do not output peer doppleganger dampened output
Donald Sharp [Fri, 23 Apr 2021 17:45:44 +0000 (13:45 -0400)]
bgpd: Do not output peer doppleganger dampened output

When we are cycling through all peers and looking for
dampening data to dump, do not consider non-configed
peers( dopplegangers ).

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agobgpd: peer / peer group dampening profiles
David Schweizer [Mon, 2 Nov 2020 15:30:01 +0000 (16:30 +0100)]
bgpd: peer / peer group dampening profiles

Changes implement dampening profiles for peers and peer groups. This is
achieved by introducing the possibility to have multible existing
dampening configurations with their own sets of parameters and lists of
associated paths.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
11 months agobgpd: vtysh commands for peer/group dampening profiles
David Schweizer [Mon, 2 Nov 2020 15:30:02 +0000 (16:30 +0100)]
bgpd: vtysh commands for peer/group dampening profiles

Additional cli commands to add dampening profiles to peers / peer groups
and functions to save dampening configurations.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
11 months agoMerge pull request #15837 from acooks-at-bda/dev/fix-deprecated-cares-api
David Lamparter [Thu, 2 May 2024 20:26:16 +0000 (22:26 +0200)]
Merge pull request #15837 from acooks-at-bda/dev/fix-deprecated-cares-api

11 months agoMerge pull request #15840 from opensourcerouting/ospf6-iftype-connected-fix
Donald Sharp [Thu, 2 May 2024 14:22:11 +0000 (10:22 -0400)]
Merge pull request #15840 from opensourcerouting/ospf6-iftype-connected-fix

ospf6d: fix interface type vs. connected routes updates

11 months agoMerge pull request #15891 from mjstapp/retry_pathd_sync_conn
Donatas Abraitis [Thu, 2 May 2024 08:18:10 +0000 (11:18 +0300)]
Merge pull request #15891 from mjstapp/retry_pathd_sync_conn

pathd: retry label-manager connection asynchronously

11 months agoMerge pull request #15890 from httpstorm/frr-macOS-section.2024-04-30
David Lamparter [Wed, 1 May 2024 14:55:54 +0000 (16:55 +0200)]
Merge pull request #15890 from httpstorm/frr-macOS-section.2024-04-30

11 months agoMerge pull request #15892 from donaldsharp/parse_attr_problems
Mark Stapp [Wed, 1 May 2024 13:43:11 +0000 (09:43 -0400)]
Merge pull request #15892 from donaldsharp/parse_attr_problems

zebra: Ensure proper decoding of netlink message

11 months agoMerge pull request #15673 from pguibert6WIND/isis_srv6_usid
Donatas Abraitis [Wed, 1 May 2024 05:26:28 +0000 (08:26 +0300)]
Merge pull request #15673 from pguibert6WIND/isis_srv6_usid

lib: fix srv6 locator flags propagated to isis

11 months agoMerge pull request #15874 from pguibert6WIND/bgp_get_sockname_coverity_1585206
Donatas Abraitis [Wed, 1 May 2024 05:24:31 +0000 (08:24 +0300)]
Merge pull request #15874 from pguibert6WIND/bgp_get_sockname_coverity_1585206

bgpd: fix covery ID 1585206

11 months agozebra: Ensure proper decoding of netlink message 15892/head
Donald Sharp [Tue, 30 Apr 2024 14:53:48 +0000 (10:53 -0400)]
zebra: Ensure proper decoding of netlink message

As part of the kernel netlink functionality, it is
possible that a bit of nested attributes can be
passed up.  This attribute has a type value which
is stored in the lower 8 bits and in the upper 8
bits are a couple control flags that can be used.
FRR can parse this data and then just throw away
the value unless we mask off the upper 8 bits.
Let's ensure that it can be properly parsed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
11 months agopathd: clean up a log message 15891/head
Mark Stapp [Tue, 30 Apr 2024 18:34:58 +0000 (14:34 -0400)]
pathd: clean up a log message

Clean up a typo in a log message.

Signed-off-by: Mark Stapp <mjs@cisco.com>
11 months agopathd: retry synchronous label-manager zapi connection
Mark Stapp [Tue, 30 Apr 2024 18:33:13 +0000 (14:33 -0400)]
pathd: retry synchronous label-manager zapi connection

Be prepared to retry setting up pathd's synchronous zapi session
that's used for label-manager.

Signed-off-by: Mark Stapp <mjs@cisco.com>
11 months agolib: fix error on MacOS 15890/head
Ruben Kerkhof [Wed, 18 Mar 2020 14:40:39 +0000 (15:40 +0100)]
lib: fix error on MacOS

Sections use a different syntax for Mach-O executables.

Fixes:

lib/bfd.c:35:1: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment and section separated by a
      comma
DEFINE_MTYPE_STATIC(LIB, BFD_INFO, "BFD info")
^
./lib/memory.h:140:2: note: expanded from macro 'DEFINE_MTYPE_STATIC'
        DEFINE_MTYPE_ATTR(group, name, static, desc)                           \
        ^
./lib/memory.h:110:26: note: expanded from macro 'DEFINE_MTYPE_ATTR'
                __attribute__((section(".data.mtypes"))) = { {                 \
                                       ^
1 error generated.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
11 months agoMerge pull request #15791 from zhou-run/202404182042
Olivier Dugeon [Tue, 30 Apr 2024 14:33:48 +0000 (16:33 +0200)]
Merge pull request #15791 from zhou-run/202404182042

isisd: When the ISIS instance does not exist, the default metric will not be wide.

12 months agoMerge pull request #15653 from pguibert6WIND/link_state_srv6_capas
Olivier Dugeon [Tue, 30 Apr 2024 13:39:11 +0000 (15:39 +0200)]
Merge pull request #15653 from pguibert6WIND/link_state_srv6_capas

Link state srv6 capas

12 months agoMerge pull request #15669 from poojarathore30/listen-limit-logging
Donatas Abraitis [Tue, 30 Apr 2024 11:54:19 +0000 (14:54 +0300)]
Merge pull request #15669 from poojarathore30/listen-limit-logging

bgpd : Ensure logging for dynamic neighbor listen limit reached

12 months agobgpd: fix covery ID 1585206 15874/head
Philippe Guibert [Mon, 29 Apr 2024 13:43:29 +0000 (15:43 +0200)]
bgpd: fix covery ID 1585206

The return value of bgp_getsockname() should always be
checked.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15619 from opensourcerouting/fix/memory_optimizations
Donald Sharp [Mon, 29 Apr 2024 13:26:03 +0000 (09:26 -0400)]
Merge pull request #15619 from opensourcerouting/fix/memory_optimizations

bgpd: Put BGP_DEBUG/CONF_BGP_DEBUG under ulikely() optimization

12 months agoMerge pull request #15834 from pguibert6WIND/alias_path_iproute2
Donald Sharp [Mon, 29 Apr 2024 13:21:48 +0000 (09:21 -0400)]
Merge pull request #15834 from pguibert6WIND/alias_path_iproute2

tools: add iproute2 alias for pathd daemon

12 months agoMerge pull request #15824 from opensourcerouting/fix/ospf_show_non_default
Donald Sharp [Mon, 29 Apr 2024 13:21:09 +0000 (09:21 -0400)]
Merge pull request #15824 from opensourcerouting/fix/ospf_show_non_default

vtysh: Show `ip ospf network ...` even if it's not the same as the interface type

12 months agoMerge pull request #15839 from opensourcerouting/ospf6-defun-unwreck
Donald Sharp [Mon, 29 Apr 2024 13:18:32 +0000 (09:18 -0400)]
Merge pull request #15839 from opensourcerouting/ospf6-defun-unwreck

ospf6d: fix DEFUN formatting wrecked by clang

12 months agoMerge pull request #15864 from opensourcerouting/fix/graceful_restart_per_neighbor
Donald Sharp [Mon, 29 Apr 2024 13:16:36 +0000 (09:16 -0400)]
Merge pull request #15864 from opensourcerouting/fix/graceful_restart_per_neighbor

tests: Check if Graceful Restart per-neighbor works as expected

12 months agoMerge pull request #15865 from opensourcerouting/fix/drop_duplicate_pytestmark
Donald Sharp [Mon, 29 Apr 2024 13:14:52 +0000 (09:14 -0400)]
Merge pull request #15865 from opensourcerouting/fix/drop_duplicate_pytestmark

tests: A bit of housekeeping for topotests

12 months agobgpd : Ensure logging for dynamic neighbor listen limit reached 15669/head
rathorepo [Thu, 18 Apr 2024 09:53:36 +0000 (09:53 +0000)]
bgpd : Ensure logging for dynamic neighbor listen limit reached

Dynamic neighbors exceeding the listen limit were rejected without appropriate logging.
Previously, only rejection logs were generated, leaving users unaware of when the limit being reached.
Adding a log message for when the listen limit is reached

Signed-off-by: Pooja Rathore <rathorepo@vmware.com>
12 months agoMerge pull request #15670 from poojarathore30/pg-deletion-with-listen-range
Donatas Abraitis [Mon, 29 Apr 2024 08:29:07 +0000 (11:29 +0300)]
Merge pull request #15670 from poojarathore30/pg-deletion-with-listen-range

bgpd : Prevent deletion of BGP peer groups associated to listen range

12 months agoMerge pull request #15851 from chiragshah6/fdev2
Donatas Abraitis [Mon, 29 Apr 2024 08:28:03 +0000 (11:28 +0300)]
Merge pull request #15851 from chiragshah6/fdev2

tools: Handle seq num for BGP as-path in frr-reload.py

12 months agoMerge pull request #15861 from anlancs/fix-bgpd-dead-code
Donatas Abraitis [Mon, 29 Apr 2024 08:25:20 +0000 (11:25 +0300)]
Merge pull request #15861 from anlancs/fix-bgpd-dead-code

bgpd: fix the dead code

12 months agotools: add iproute2 alias for pathd daemon 15834/head
Philippe Guibert [Wed, 24 Apr 2024 15:06:17 +0000 (17:06 +0200)]
tools: add iproute2 alias for pathd daemon

With SRv6 traffic engineering, some ipv6 routes will
be installed by the Pathd daemon.
Populate the iproute2 aliasing table with pathd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agotests: Apply black formatting from what frrbot suggested to be happy 15865/head
Donatas Abraitis [Sat, 27 Apr 2024 20:39:48 +0000 (23:39 +0300)]
tests: Apply black formatting from what frrbot suggested to be happy

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Add missing check_router_status for bgp_tcp_mss test
Donatas Abraitis [Sat, 27 Apr 2024 20:30:08 +0000 (23:30 +0300)]
tests: Add missing check_router_status for bgp_tcp_mss test

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotools: Add black formatting commit to .git-blame-ignore-revs
Donatas Abraitis [Sat, 27 Apr 2024 20:20:58 +0000 (23:20 +0300)]
tools: Add black formatting commit to .git-blame-ignore-revs

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Apply black formatting for all tests/topotests
Donatas Abraitis [Sat, 27 Apr 2024 20:19:32 +0000 (23:19 +0300)]
tests: Apply black formatting for all tests/topotests

It's just annoying when the linter tells to apply the formatting for the code
you didn't touch.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Drop duplicate pytestmark per file
Donatas Abraitis [Sat, 27 Apr 2024 20:18:15 +0000 (23:18 +0300)]
tests: Drop duplicate pytestmark per file

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Drop debug statements from bgp_gr_restart_retain_routes 15864/head
Donatas Abraitis [Sat, 27 Apr 2024 20:09:40 +0000 (23:09 +0300)]
tests: Drop debug statements from bgp_gr_restart_retain_routes

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Check if Graceful Restart per-neighbor works as expected
Donatas Abraitis [Sat, 27 Apr 2024 20:06:19 +0000 (23:06 +0300)]
tests: Check if Graceful Restart per-neighbor works as expected

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agotests: Use a single frr.conf for bgp_gr_restart_retain_routes
Donatas Abraitis [Sat, 27 Apr 2024 20:00:36 +0000 (23:00 +0300)]
tests: Use a single frr.conf for bgp_gr_restart_retain_routes

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
12 months agoMerge pull request #15854 from mjstapp/dump_outofsync_flag
Donatas Abraitis [Sat, 27 Apr 2024 18:16:49 +0000 (21:16 +0300)]
Merge pull request #15854 from mjstapp/dump_outofsync_flag

lib: add ZEBRA_FLAG_OUTOFSYNC to dump_flags function

12 months agobgpd : Prevent deletion of BGP peer groups associated to listen range 15670/head
rathorepo [Wed, 3 Apr 2024 10:54:46 +0000 (10:54 +0000)]
bgpd : Prevent deletion of BGP peer groups associated to listen range

Description:
-----
Deleting a peer group also deletes its associated BGP listen range.
This behaviour is undesired as it could cause unintended configuration changes.

Fix :
-----
-Do not allow peer group deletion until they are no longer associated with any listen range.
-Check the count of listen ranges attached to the group.
If any listen ranges are found, returns a configuration warning, preventing the deletion.

Signed-off-by: Pooja Rathore <rathorepo@vmware.com>
12 months agobgpd: fix the dead code 15861/head
anlan_cs [Sat, 27 Apr 2024 12:59:05 +0000 (20:59 +0800)]
bgpd: fix the dead code

Fixed the Coverity issue 1586018:
Control flow issues (DEADCODE) /bgpd/bgp_ecommunity.c: 1402 in ecommunity_ecom2str()

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agoMerge pull request #15782 from opensourcerouting/fix/drop_srte_color_flag
Russ White [Sat, 27 Apr 2024 12:19:09 +0000 (08:19 -0400)]
Merge pull request #15782 from opensourcerouting/fix/drop_srte_color_flag

bgpd: Drop SRTE_COLOR attribute flag

12 months agoMerge pull request #15848 from donaldsharp/pim_crash_dnode
Jafar Al-Gharaibeh [Sat, 27 Apr 2024 03:28:10 +0000 (22:28 -0500)]
Merge pull request #15848 from donaldsharp/pim_crash_dnode

pimd: fix crash unconfiguring rp keepalive timer

12 months agoMerge pull request #15796 from LabNConsulting/aceelindem/ospf-ospfapi-options
Donatas Abraitis [Fri, 26 Apr 2024 20:31:38 +0000 (23:31 +0300)]
Merge pull request #15796 from LabNConsulting/aceelindem/ospf-ospfapi-options

ospfd: OSPFAPI Server options to limit to local connections and per-instance TCP

12 months agoMerge pull request #15759 from anlancs/doc-isisd-cleanup-1
Donatas Abraitis [Fri, 26 Apr 2024 20:29:58 +0000 (23:29 +0300)]
Merge pull request #15759 from anlancs/doc-isisd-cleanup-1

doc: clean up a few commands for isis

12 months agoMerge pull request #15737 from vjardin/cmake_install_prefix
Donatas Abraitis [Fri, 26 Apr 2024 20:29:29 +0000 (23:29 +0300)]
Merge pull request #15737 from vjardin/cmake_install_prefix

cmake install prefix

12 months agoMerge pull request #15841 from pguibert6WIND/dx6_support
Donatas Abraitis [Fri, 26 Apr 2024 20:25:34 +0000 (23:25 +0300)]
Merge pull request #15841 from pguibert6WIND/dx6_support

zebra, sharpd: add srv6 End.DX6 support

12 months agoMerge pull request #15845 from pguibert6WIND/bmp_improvements
Donatas Abraitis [Fri, 26 Apr 2024 20:24:54 +0000 (23:24 +0300)]
Merge pull request #15845 from pguibert6WIND/bmp_improvements

Bmp improvements about statistics

12 months agolib: add ZEBRA_FLAG_OUTOFSYNC to dump_flags function 15854/head
Mark Stapp [Fri, 26 Apr 2024 18:48:00 +0000 (14:48 -0400)]
lib: add ZEBRA_FLAG_OUTOFSYNC to dump_flags function

Right where the zapi route flags are defined, there's a comment
asking that the flag-dumper-function also be updated.

Also apply clang-format's preferences, so next person won't have
to.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agoMerge pull request #15723 from opensourcerouting/feature/extended_link_bw_refactored_v1
Russ White [Fri, 26 Apr 2024 18:41:05 +0000 (14:41 -0400)]
Merge pull request #15723 from opensourcerouting/feature/extended_link_bw_refactored_v1

bgpd: Implement extended link-bandwidth

12 months agoMerge pull request #15588 from opensourcerouting/sqlite-filename-size
Donald Sharp [Fri, 26 Apr 2024 14:19:05 +0000 (10:19 -0400)]
Merge pull request #15588 from opensourcerouting/sqlite-filename-size

lib: fix SQLite dbfile path length

12 months agopimd: fix crash unconfiguring rp keepalive timer 15848/head
Vijayalaxmi Basavaraj [Mon, 22 Apr 2024 17:55:23 +0000 (10:55 -0700)]
pimd: fix crash unconfiguring rp keepalive timer

pimd crashs while unconfigure of rp ka timer as we are trying to access
a yand dnode(suppress timer) which does not exist at the moment.

User just configured rp keepalive timer and not suppress timer,
the yang dnode would not be present. Instead of directly accessing
yang_dnode_get_unit16, first check the yang node exist using
the xpath.

Ticket: #3874971

Testing:

Before:
------
tor-11(config)# no ip pim rp keep-alive-timer 3000
vtysh: error reading from pimd: Success (0)Warning: closing connection to pimd because of an I/O error!

Broadcast message from root@tor-11 (somewhere) (Mon Apr 22 17:29:12 2024):

cumulus-core: Running cl-support for core files "pimd.25467.1713806952.core"

After:
-----
tor-11(config)# no ip pim rp keep-alive-timer 3000
tor-11(config)#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>
12 months agoMerge pull request #15843 from opensourcerouting/yang-link-netconf-acm
Mark Stapp [Fri, 26 Apr 2024 13:31:44 +0000 (09:31 -0400)]
Merge pull request #15843 from opensourcerouting/yang-link-netconf-acm

yang: ietf-netconf-acm needs to be in libfrr

12 months agoMerge pull request #15850 from donaldsharp/sa_clang_15_some_problems
Mark Stapp [Fri, 26 Apr 2024 12:01:26 +0000 (08:01 -0400)]
Merge pull request #15850 from donaldsharp/sa_clang_15_some_problems

bgpd: Remove unused addition found in clang

12 months agoMerge pull request #15744 from pguibert6WIND/snmp_oid_line73_error
Donald Sharp [Fri, 26 Apr 2024 11:38:42 +0000 (07:38 -0400)]
Merge pull request #15744 from pguibert6WIND/snmp_oid_line73_error

topotests: lib, fix filter out "At line 73 in /usr/share/snmp/mibs/ie…

12 months agoMerge pull request #15849 from donaldsharp/redistibute_doc_change
Donatas Abraitis [Fri, 26 Apr 2024 09:52:37 +0000 (12:52 +0300)]
Merge pull request #15849 from donaldsharp/redistibute_doc_change

bgpd: Explain Better admin w/ redistribution a bit better.

12 months agobgpd: add bmp loc-rib 64 bit gauge value 15845/head
Philippe Guibert [Thu, 25 Apr 2024 15:50:24 +0000 (17:50 +0200)]
bgpd: add bmp loc-rib 64 bit gauge value

There is no support for option 8, as per RFC7854.
Add the 64 bit counter in the peer structure.
Add the missing per peer statistic.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agobgpd: add 'bmp stat send-experimental' command
Philippe Guibert [Thu, 25 Apr 2024 15:30:57 +0000 (17:30 +0200)]
bgpd: add 'bmp stat send-experimental' command

Some wireshark versions can not decode the experimental
bmp stat code. This may also be the case for some collectors.
Add a vty command to be able to disable bmp to sending
those values.

> [no] bmp stat send-experimental

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agobgpd: add bmp adj-rib-in 64 bit gauge value
Philippe Guibert [Thu, 25 Apr 2024 14:53:21 +0000 (16:53 +0200)]
bgpd: add bmp adj-rib-in 64 bit gauge value

There is no support for option 7, as per RFC7854.
Add the 64 bit counter in the peer structure.
Add the 64 bit bmp value write api.
Add the missing per peer statistic.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agotools: Handle seq num for BGP as-path in frr-reload.py 15851/head
Chirag Shah [Fri, 26 Apr 2024 01:52:31 +0000 (18:52 -0700)]
tools: Handle seq num for BGP as-path in frr-reload.py

If frr.conf has bgp as-path access-list clause without sequence number
then upon performing frr-rleoad, the running config clause with sequence
number will always be deleted and the new ones without sequence will
be re-added.
This could lead to blackholing until the config gets reapplied.

Testing:

frr.conf:
bgp as-path access-list important_internet_bgp_as_numbers permit _16509_

Running config:
bgp as-path access-list important_internet_bgp_as_numbers seq 5 permit
_16509_
!

Before fix
Upon frr-reload it deletes and readd line as without seq

2024-04-26 03:16:45,772  INFO: Executed "no bgp as-path access-list
important_internet_bgp_as_numbers seq 5 permit _16509_"

'bgp as-path access-list important_internet_bgp_as_numbers permit
_16509_\n'

After fix:
no form is not executed and no delta determine between frr.conf
and running-config.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
12 months agolib: replace deprecated ares_gethostbyname 15837/head
Andrew Cooks [Thu, 25 Apr 2024 07:18:39 +0000 (17:18 +1000)]
lib: replace deprecated ares_gethostbyname

c-ares has deprecated ares_gethostbyname() in version 1.28.0
Replace it with ares_getaddrinfo().

This fixes a build error on Fedora 40.

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
12 months agobgpd: Remove unused addition found in clang 15850/head
Donald Sharp [Thu, 25 Apr 2024 18:45:32 +0000 (14:45 -0400)]
bgpd: Remove unused addition found in clang

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agobgpd: Explain Better admin w/ redistribution a bit better. 15849/head
Donald Sharp [Thu, 25 Apr 2024 18:17:46 +0000 (14:17 -0400)]
bgpd: Explain Better admin w/ redistribution a bit better.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
12 months agoospfd: OSPFAPI Server options to limit to local connections and per-instance TCP 15796/head
Acee Lindem [Fri, 19 Apr 2024 15:33:20 +0000 (15:33 +0000)]
ospfd: OSPFAPI Server options to limit to local connections and per-instance TCP

This commit include OSPFAPI Server options to:

 1. Allow specification of the OSPFAPI server local address.
 2. Allow different OSPFAPI server TCP ports to be specified for different
    OSPF instances in /etc/services.

Signed-off-by: Acee Lindem <acee@lindem.com>
12 months agoyang: ietf-netconf-acm needs to be in libfrr 15843/head
David Lamparter [Thu, 25 Apr 2024 13:06:14 +0000 (15:06 +0200)]
yang: ietf-netconf-acm needs to be in libfrr

ietf-key-chain depends on ietf-netconf-acm, and lib/ code sets up the
former, so ietf-netconf-acm needs to be embedded in the libfrr too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 months agozebra, sharpd: add srv6 End.DX6 support 15841/head
Philippe Guibert [Thu, 25 Apr 2024 11:38:23 +0000 (13:38 +0200)]
zebra, sharpd: add srv6 End.DX6 support

Add the support for adding DX6 behavior into netlink layer of zebra.
Add the necessary test in sharpd.

> ubuntu2204# sharp install seg6local-routes 1:1::1:2 nexthop-seg6local loop1 End_DX6 4:4::4:6 1
> ubuntu2204# do show ipv6 route
> [..]
> D>* 1:1::1:2/128 [150/0] is directly connected, loop1, seg6local End.DX6 nh6 4:4::4:6, weight 1, 00:00:03

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
12 months agoMerge pull request #15833 from mjstapp/fix_vtysh_bgp_defs
David Lamparter [Thu, 25 Apr 2024 11:10:43 +0000 (13:10 +0200)]
Merge pull request #15833 from mjstapp/fix_vtysh_bgp_defs

12 months agoospf6d: accept CLI `no` for point-to-multipoint 15840/head
David Lamparter [Thu, 25 Apr 2024 10:20:27 +0000 (12:20 +0200)]
ospf6d: accept CLI `no` for point-to-multipoint

`point-to-multipoint` was missing on the removal variant of this CLI
command.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 months agoospf6d: force recalculate on interface_up
David Lamparter [Thu, 25 Apr 2024 10:18:08 +0000 (12:18 +0200)]
ospf6d: force recalculate on interface_up

interface_up also handles changes to the interface type, i.e. broadcast
to ptp to ptmp.  Connected routes for these are different and must be
readvertised, which is done in ospf6_interface_recalculate_cost() - but
only if the cost changed.  Use the force variant here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 months agoospf6d: fix loopback/ptp/ptmp conn. route checks
David Lamparter [Thu, 25 Apr 2024 10:16:35 +0000 (12:16 +0200)]
ospf6d: fix loopback/ptp/ptmp conn. route checks

The code emitting connected routes was checking against the interface
state (which can also be lo/ptp/ptmp) rather than the interface type.
This was causing wrong IA prefixes for connected routes getting put up
out if the interface was down intermittently.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 months agoospf6d: fix DEFUN formatting wrecked by clang 15839/head
David Lamparter [Thu, 25 Apr 2024 09:45:19 +0000 (11:45 +0200)]
ospf6d: fix DEFUN formatting wrecked by clang

clang-format doesn't understand `DEFUN` and formats it rather ugly.
Standard approach was to skip these in clang-format, which hasn't
happened here sadly.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 months agolib: replace deprecated ares_process()
Andrew Cooks [Wed, 24 Apr 2024 05:01:28 +0000 (15:01 +1000)]
lib: replace deprecated ares_process()

ares_process(...) has been deprecated.
Replace it with ares_process_fd(...)

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
12 months agodocs: libs install-prefix since cmake 3.21 15737/head
Vincent JARDIN [Sun, 14 Apr 2024 08:49:26 +0000 (10:49 +0200)]
docs: libs install-prefix since cmake 3.21

use the new recommendation from cmake:
  --install-prefix <directory>
     New in version 3.21.

     Specify the installation directory, used by the
     CMAKE_INSTALL_PREFIX variable. Must be an
     absolute path.

reminder: the default path is /usr/local instead of /usr

Signed-off-by: Vincent Jardin <vjardin@free.fr>
12 months agodocs: sysrepo install-prefix since cmake 3.21
Vincent JARDIN [Sun, 14 Apr 2024 08:46:34 +0000 (10:46 +0200)]
docs: sysrepo install-prefix since cmake 3.21

use the new recommendation from cmake:
  --install-prefix <directory>
     New in version 3.21.

     Specify the installation directory, used by the
     CMAKE_INSTALL_PREFIX variable. Must be an
     absolute path.

reminder: the default path is /usr/local instead of /usr

Signed-off-by: Vincent Jardin <vjardin@free.fr>
12 months agodocs: libyang install-prefix since cmake 3.21
Vincent JARDIN [Sun, 14 Apr 2024 08:43:07 +0000 (10:43 +0200)]
docs: libyang install-prefix since cmake 3.21

use the new recommendation from cmake:
  --install-prefix <directory>
     New in version 3.21.

     Specify the installation directory, used by the
     CMAKE_INSTALL_PREFIX variable. Must be an
     absolute path.

reminder: the default path is /usr/local instead of /usr

Signed-off-by: Vincent Jardin <vjardin@free.fr>
12 months agoMerge pull request #15794 from chiragshah6/fdev2
Donatas Abraitis [Wed, 24 Apr 2024 19:33:37 +0000 (22:33 +0300)]
Merge pull request #15794 from chiragshah6/fdev2

tools: fix pim interface config deletion II

12 months agoMerge pull request #15783 from LabNConsulting/aceelindem/ospf-neighbor-filter
Donatas Abraitis [Wed, 24 Apr 2024 19:30:11 +0000 (22:30 +0300)]
Merge pull request #15783 from LabNConsulting/aceelindem/ospf-neighbor-filter

ospfd: Add prefix-list filtering of OSPF neighbors on OSPF interface

12 months agoMerge pull request #15805 from LabNConsulting/working/lb/nhrp-retry-based-on-config2
Donald Sharp [Wed, 24 Apr 2024 14:16:59 +0000 (10:16 -0400)]
Merge pull request #15805 from LabNConsulting/working/lb/nhrp-retry-based-on-config2

nhrp: replace hard coded retry time with value derived from holdtime

12 months agodoc: clean up a few commands for isis 15759/head
anlan_cs [Tue, 16 Apr 2024 09:23:20 +0000 (17:23 +0800)]
doc: clean up a few commands for isis

Remove a few obsoleted isis commands based on code.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
12 months agolib,bgpd,vtysh: move bgp vty defines to lib 15833/head
Mark Stapp [Wed, 24 Apr 2024 12:23:12 +0000 (08:23 -0400)]
lib,bgpd,vtysh: move bgp vty defines to lib

Stop including a bgp header file from vtysh; move a couple
of cli string defines to a library header.

Signed-off-by: Mark Stapp <mjs@cisco.com>
12 months agoMerge pull request #15766 from louis-6wind/fix-network-rd
Donatas Abraitis [Wed, 24 Apr 2024 11:34:19 +0000 (14:34 +0300)]
Merge pull request #15766 from louis-6wind/fix-network-rd

bgpd: fix show run of network route-distinguisher

12 months agoMerge pull request #15819 from louis-6wind/fix-snmp-oid
Donald Sharp [Wed, 24 Apr 2024 11:25:22 +0000 (07:25 -0400)]
Merge pull request #15819 from louis-6wind/fix-snmp-oid

bgpd, ospfd: fix non increasing SNMP OID

12 months agotools: fix frr-reload for no ip msdp peer cmd 15794/head
Chirag Shah [Tue, 23 Apr 2024 02:47:27 +0000 (19:47 -0700)]
tools: fix frr-reload for no ip msdp peer cmd

no form of 'ip pm msdp peer <> source <>' does not
accept source argument. Stip the 'source <>' part from
config line being deleted via frr-reload.

Ticket: #3874971
Testing:

Config:
vrf blue
 ip msdp peer 1.1.1.1 source 1.1.1.1

frr-reload failure log:
2024-04-23 02:08:32,501  INFO: Failed to execute vrf blue  no ip
msdp peer 1.1.1.1 source 1.1.1.1 exit
2024-04-23 02:08:32,501 ERROR: "vrf blue --  no ip msdp peer 1.1.1.1
source 1.1.1.1 -- exit" we failed to remove this command
2024-04-23 02:08:32,501 ERROR: % Unknown command:  no ip msdp peer
1.1.1.1 source 1.1.1.1

Signed-off-by: Chirag Shah <chirag@nvidia.com>
12 months agotools: fix pim interface config deletionII
Chirag Shah [Thu, 18 Apr 2024 18:44:00 +0000 (11:44 -0700)]
tools: fix pim interface config deletionII

When no ip pim is performed subsequent pim related
configs under the interface also implicitly deleted.
The previous fix was attempting to remove from the same
list which was being integrated.
First collect the lines to remove in separate list
then at the end remove from the original lines_to_del.

commit 623af04e1c does not work properly if tries to delete
an entry from existing list which is being walked on.

Ticket: #3869779

Testing done:

frr.conf:
no interface config

running-config:
--------------
interface swp1
ip pim
ip pim active-active
ip pim allow-rp rp-list sample
ip pim bfd
ip pim use-source 1.1.1.1
ip multicast boundary oil test
exit

frr-reload log pointing only no ip pim config
is removed under interface:
2024-04-18 18:44:37,202  INFO: "frr defaults datacenter" cannot be removed
2024-04-18 18:44:37,202  INFO: "service integrated-vtysh-config" cannot be removed
2024-04-18 18:44:37,504  INFO: Executed "interface swp1  no ip pim exit"
2024-04-18 18:44:37,505  INFO: /var/run/frr/reload-YHS51E.txt content

Signed-off-by: Chirag Shah <chirag@nvidia.com>
12 months agoMerge pull request #15769 from raja-rajasekar/rajasekarr/backpressure_display_i_o_buf
Mark Stapp [Tue, 23 Apr 2024 17:01:35 +0000 (13:01 -0400)]
Merge pull request #15769 from raja-rajasekar/rajasekarr/backpressure_display_i_o_buf

zebra: Actually display I/O buffer sizes (part-2)

12 months agoMerge pull request #15801 from LabNConsulting/chopps/new-munet
Donald Sharp [Tue, 23 Apr 2024 16:58:48 +0000 (12:58 -0400)]
Merge pull request #15801 from LabNConsulting/chopps/new-munet

Improve coverage functionality

12 months agoMerge pull request #15810 from opensourcerouting/fix/enforce_first_as_bgp_peer-group
Donald Sharp [Tue, 23 Apr 2024 16:57:24 +0000 (12:57 -0400)]
Merge pull request #15810 from opensourcerouting/fix/enforce_first_as_bgp_peer-group

bgpd: Inherit some peer flags from the peer-group

12 months agoMerge pull request #15714 from mjstapp/sync_pthread_startup
Donald Sharp [Tue, 23 Apr 2024 16:55:27 +0000 (12:55 -0400)]
Merge pull request #15714 from mjstapp/sync_pthread_startup

lib: serialize pthread startup