]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
7 months agotests: catch exception during switch shutdown 15903/head
Y Bharath [Tue, 7 May 2024 15:01:03 +0000 (20:31 +0530)]
tests: catch exception during switch shutdown

Signed-off-by: y-bharath14 <y.bharath@samsung.com>
7 months agoMerge pull request #16909 from donaldsharp/help
Jafar Al-Gharaibeh [Wed, 25 Sep 2024 02:23:03 +0000 (21:23 -0500)]
Merge pull request #16909 from donaldsharp/help

lib: Help text correction

7 months agoMerge pull request #16911 from donaldsharp/command_node_is_fun
Jafar Al-Gharaibeh [Wed, 25 Sep 2024 02:22:11 +0000 (21:22 -0500)]
Merge pull request #16911 from donaldsharp/command_node_is_fun

Command node is fun

7 months agolib: Removed unused RFP_DEFAULTS_NODE 16911/head
Donald Sharp [Tue, 24 Sep 2024 20:11:43 +0000 (16:11 -0400)]
lib: Removed unused RFP_DEFAULTS_NODE

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agolib, zebra: TABLE_NODE is not used
Donald Sharp [Tue, 24 Sep 2024 20:05:54 +0000 (16:05 -0400)]
lib, zebra: TABLE_NODE is not used

No-one is using this, remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16634 from nabahr/autorp
Donald Sharp [Tue, 24 Sep 2024 19:36:09 +0000 (15:36 -0400)]
Merge pull request #16634 from nabahr/autorp

PIM: Implement AutoRP functionality

7 months agolib: Help text correction 16909/head
Donald Sharp [Tue, 24 Sep 2024 19:25:49 +0000 (15:25 -0400)]
lib: Help text correction

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16908 from donaldsharp/ospf6_snmp_special
Jafar Al-Gharaibeh [Tue, 24 Sep 2024 18:39:57 +0000 (13:39 -0500)]
Merge pull request #16908 from donaldsharp/ospf6_snmp_special

ospf6d: Remove unguarded debugs in ospf6_snmp.c

7 months agotests: Addition of AutoRP Discovery uncovered broken PIM test 16634/head
Nathan Bahr [Wed, 18 Sep 2024 15:00:10 +0000 (15:00 +0000)]
tests: Addition of AutoRP Discovery uncovered broken PIM test

With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For pim.py
  The clear IGMP interfaces function is in a broken state. It was
  already ignoring any errors and returned true always, but with
  the addition of the AutoRP discovery group, you could end up
  with a different group order in the json which would cause a key
  error making the test fail. For now I just added a check to
  avoid the key error.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agotests: Update existing tests for changes introduced by AutoRP Discovery
Nathan Bahr [Wed, 18 Sep 2024 14:58:48 +0000 (14:58 +0000)]
tests: Update existing tests for changes introduced by AutoRP Discovery

With AutoRP discovery running by default, that adds a new
IGMP group that needs to be accounted for in IGMP output.

For multicast_pim_sm_topo3:
  Ignore the total group number as it is unnecessary for the test.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agotests: Added tests for new AutoRP functionality
Nathan Bahr [Tue, 17 Sep 2024 21:23:19 +0000 (21:23 +0000)]
tests: Added tests for new AutoRP functionality

Uses hardcoded sample AutoRP packets injected in to test
message parsing and proper application of AutoRP learned
RP info. Tests mix of AutoRP and static RP's.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agodoc: Add user documentation for AutoRP CLI
Nathan Bahr [Tue, 17 Sep 2024 02:35:27 +0000 (02:35 +0000)]
doc: Add user documentation for AutoRP CLI

Document the CLI commands to configure AutoRP discovery
and candidate RP announcements.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agopimd,yang: Implement AutoRP CLI and NB config path
Nathan Bahr [Tue, 17 Sep 2024 02:10:03 +0000 (02:10 +0000)]
pimd,yang: Implement AutoRP CLI and NB config path

New CLI commands added:
router pim [vrf NAME]
  autorp discovery
  autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST]
  autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)}

autorp discovery
  Enables Auto RP discovery for learning dynamic RP information using the
  AutoRP protocol.

autorp announce RP-ADDR [GROUP | group-list PREFIX-LIST]
  Enable announcements of a candidate RP with the given group range, or
  prefix list of group ranges, to an AutoRP mapping agent.

autorp announce {scope (1-255) | interval (1-65535) | holdtime (0-65535)}
  Configure the parameters of the AutoRP announcement messages.
  The scope sets the packet TTL.
  The interval sets the time between TX of announcements.
  The holdtime sets the hold time in the message, the time the mapping
  agent should wait before invalidating the candidate RP information.

debug pim autorp
  Enable debug logging of the AutoRP protocol

show ip pim [vrf NAME] autorp [json]
  Show details of the AutoRP protocol.
  To view learned RP info, use the existing command 'show ip pim rp-info'

Extend pim yang for new configuration:
  augment /frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-pim:pim/frr-pim:address-family:
    +--rw rp
       +--rw auto-rp
          +--rw discovery-enabled?   boolean
          +--rw announce-scope?      uint8
          +--rw announce-interval?   uint16
          +--rw announce-holdtime?   uint16
          +--rw candidate-rp-list* [rp-address]
             +--rw rp-address           inet:ip-address
             +--rw (group-or-prefix-list)?
                +--:(group)
                |  +--rw group?         frr-route-types:ip-multicast-group-prefix
                +--:(prefix-list)
                   +--rw prefix-list?   plist-ref

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agopimd: Add AutoRP functionality to PIMD
Nathan Bahr [Tue, 17 Sep 2024 02:32:59 +0000 (02:32 +0000)]
pimd: Add AutoRP functionality to PIMD

Perform AutoRP discovery and candidate RP announcements using the
AutoRP protocol.
Mapping agent is not yet implemented, but this feature is not
necessary for FRR to support AutoRP as we only need one AutoRP
mapping agent in the network.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
7 months agoMerge pull request #16861 from btrent98/igmp-proxy2
Donald Sharp [Tue, 24 Sep 2024 16:32:15 +0000 (12:32 -0400)]
Merge pull request #16861 from btrent98/igmp-proxy2

Add igmp proxy support

7 months agoMerge pull request #16788 from LabNConsulting/jmuthii/nhrpd-retry-resolution
Jafar Al-Gharaibeh [Tue, 24 Sep 2024 16:07:21 +0000 (11:07 -0500)]
Merge pull request #16788 from LabNConsulting/jmuthii/nhrpd-retry-resolution

nhrpd: Implement retrying resolution request

7 months agoMerge pull request #16855 from zhou-run/202409131731
Russ White [Tue, 24 Sep 2024 15:25:13 +0000 (11:25 -0400)]
Merge pull request #16855 from zhou-run/202409131731

isisd: Fix NHLFE entry memory leaks

7 months agoMerge pull request #16907 from opensourcerouting/fix/load_built-in_lua_functions
Russ White [Tue, 24 Sep 2024 14:56:25 +0000 (10:56 -0400)]
Merge pull request #16907 from opensourcerouting/fix/load_built-in_lua_functions

lib: Load built-in Lua functions

7 months agoospf6d: Remove unguarded debugs in ospf6_snmp.c 16908/head
Donald Sharp [Tue, 24 Sep 2024 14:44:15 +0000 (10:44 -0400)]
ospf6d: Remove unguarded debugs in ospf6_snmp.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16906 from opensourcerouting/fix/match_peer_self
Russ White [Tue, 24 Sep 2024 14:16:35 +0000 (10:16 -0400)]
Merge pull request #16906 from opensourcerouting/fix/match_peer_self

bgpd: Return NOMATCH only if both conf_if/group does not exist

7 months agoMerge pull request #16904 from louis-6wind/fix-zebra-rib-range
Russ White [Tue, 24 Sep 2024 14:15:25 +0000 (10:15 -0400)]
Merge pull request #16904 from louis-6wind/fix-zebra-rib-range

tests: fix zebra_rib range

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

tests: Simplify BGP dual-as topotest

7 months agoMerge pull request #16853 from Shbinging/no_ip_ospf_dead_interval_minimal
Russ White [Tue, 24 Sep 2024 14:03:29 +0000 (10:03 -0400)]
Merge pull request #16853 from Shbinging/no_ip_ospf_dead_interval_minimal

ospfd: fix snytax of some no commands

7 months agoMerge pull request #16851 from Shbinging/fix_timer_throttle_spf
Russ White [Tue, 24 Sep 2024 14:03:05 +0000 (10:03 -0400)]
Merge pull request #16851 from Shbinging/fix_timer_throttle_spf

ospfd: reset spf_hold_multiplier when current SPF delay state is changed

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

Refreshement of BGP multi ASNs

7 months agoMerge pull request #16533 from acooks-at-bda/less-controversial-ospf6d-refactor-befor...
Russ White [Tue, 24 Sep 2024 13:50:19 +0000 (09:50 -0400)]
Merge pull request #16533 from acooks-at-bda/less-controversial-ospf6d-refactor-before-adding-tlvs

OSPF6: Refactor to prepare for E-LSA handling

7 months agoMerge pull request #16219 from cunningr/prevent-ipv6-link-local-injection
Russ White [Tue, 24 Sep 2024 13:44:36 +0000 (09:44 -0400)]
Merge pull request #16219 from cunningr/prevent-ipv6-link-local-injection

bgpd - Exclude case for remote prefix w/o link-local #16198

7 months agotests: Check if built-in Lua functions are working 16907/head
Donatas Abraitis [Tue, 24 Sep 2024 10:27:43 +0000 (13:27 +0300)]
tests: Check if built-in Lua functions are working

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agolib: Load built-in Lua functions
Donatas Abraitis [Tue, 24 Sep 2024 10:13:50 +0000 (13:13 +0300)]
lib: Load built-in Lua functions

We can't use even `string()` function because built-in functions are not
loaded.

Testing with:

```
$ cat /etc/frr/scripts/zebra.lua
function on_rib_process_dplane_results(ctx)
log.warn(string.upper("testas"))
return {}
end
```

This results to "TESTAS" in the logs.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agotests: Add a basic test to verify `match peer ...` 16906/head
Donatas Abraitis [Tue, 24 Sep 2024 09:28:56 +0000 (12:28 +0300)]
tests: Add a basic test to verify `match peer ...`

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agobgpd: Return NOMATCH only if both conf_if/group does not exist
Donatas Abraitis [Tue, 24 Sep 2024 09:27:45 +0000 (12:27 +0300)]
bgpd: Return NOMATCH only if both conf_if/group does not exist

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agotests: fix zebra_rib range 16904/head
Louis Scalbert [Mon, 23 Sep 2024 15:57:48 +0000 (17:57 +0200)]
tests: fix zebra_rib range

Range is wrong. We want values 1 and 2 but we only test 1.

> >>> for i in range(1, 2):
> ...     print(i)
> ...
> 1

Fixes: abd2a1ff3f ("tests: Test some basic kernel <-> zebra interactions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoMerge pull request #16902 from donaldsharp/forwarding_on_off
Donatas Abraitis [Tue, 24 Sep 2024 07:22:00 +0000 (10:22 +0300)]
Merge pull request #16902 from donaldsharp/forwarding_on_off

tests: Add v4/v6 forwarding off/on

7 months agotests: Add v4/v6 forwarding off/on 16902/head
Donald Sharp [Mon, 23 Sep 2024 19:07:28 +0000 (15:07 -0400)]
tests: Add v4/v6 forwarding off/on

There are no tests that ensured that turning off then on
v4 and v6 forwarding actually worked.  This does so.
This was found via looking at the code coverage.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agotests: add topotest for igmp proxy 16861/head
Barry A. Trent [Tue, 17 Sep 2024 20:15:27 +0000 (13:15 -0700)]
tests: add topotest for igmp proxy

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agodoc: add documentation for ip igmp proxy cli
Barry A. Trent [Mon, 16 Sep 2024 22:34:01 +0000 (15:34 -0700)]
doc: add documentation for ip igmp proxy cli

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agopimd: add show commands for igmp proxy joins
Barry A. Trent [Tue, 17 Sep 2024 21:21:05 +0000 (14:21 -0700)]
pimd: add show commands for igmp proxy joins

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agopimd: add proxy join/prune functionality
Barry A. Trent [Tue, 20 Aug 2024 21:34:26 +0000 (14:34 -0700)]
pimd: add proxy join/prune functionality

Use existing igmp static join infrastructure.
Add an enum to distinguish static from proxy joins.

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agobgpd: Delete EVPN VRF instace if it's not a hidden instance only 16838/head
Donatas Abraitis [Mon, 23 Sep 2024 13:55:31 +0000 (16:55 +0300)]
bgpd: Delete EVPN VRF instace if it's not a hidden instance only

```
==5445==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7ff4c6bedb19 bp 0x7ffc95f2e400 sp 0x7ffc95f2e3c0 T0)
==5445==The signal is caused by a READ memory access.
==5445==Hint: address points to the zero page.
    #0 0x7ff4c6bedb19 in hash_iterate lib/hash.c:246
    #1 0x5618f41f5f59 in bgp_evpn_nh_finish bgpd/bgp_evpn_mh.c:4663
    #2 0x5618f41dcbe8 in bgp_evpn_vrf_delete bgpd/bgp_evpn.c:7336
    #3 0x5618f43bdd35 in bgp_delete bgpd/bgpd.c:4098
    #4 0x5618f417ef6e in bgp_exit bgpd/bgp_main.c:206
    #5 0x5618f417ef6e in sigint bgpd/bgp_main.c:164
    #6 0x7ff4c6cac6c4 in frr_sigevent_process lib/sigevent.c:117
    #7 0x7ff4c6cd8258 in event_fetch lib/event.c:1767
    #8 0x7ff4c6c0dcbc in frr_run lib/libfrr.c:1230
    #9 0x5618f418080d in main bgpd/bgp_main.c:555
    #10 0x7ff4c670c249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0x7ff4c670c304 in __libc_start_main_impl ../csu/libc-start.c:360
    #12 0x5618f417ea20 in _start (/usr/lib/frr/bgpd+0x2e4a20)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV lib/hash.c:246 in hash_iterate
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16859 from mjstapp/bgp_cancel_once
Donatas Abraitis [Mon, 23 Sep 2024 09:01:05 +0000 (11:01 +0200)]
Merge pull request #16859 from mjstapp/bgp_cancel_once

bgpd: cancel events once in peer_free()

7 months agoMerge pull request #16873 from louis-6wind/fix-yang-rmap
Donatas Abraitis [Mon, 23 Sep 2024 08:44:21 +0000 (10:44 +0200)]
Merge pull request #16873 from louis-6wind/fix-yang-rmap

yang: use relative path for route-map

7 months agoMerge pull request #16882 from mjstapp/fix_if_table_unlock
Donatas Abraitis [Mon, 23 Sep 2024 08:24:52 +0000 (10:24 +0200)]
Merge pull request #16882 from mjstapp/fix_if_table_unlock

zebra: unlock if_table route_nodes

7 months agoMerge pull request #16887 from zhou-run/202409211508
Donatas Abraitis [Mon, 23 Sep 2024 08:24:36 +0000 (10:24 +0200)]
Merge pull request #16887 from zhou-run/202409211508

isisd: Fix infinity flag not being set successfully

7 months agoospfd: reset spf_hold_multiplier when current SPF delay state is changed 16851/head
Shbinging [Wed, 18 Sep 2024 04:23:23 +0000 (12:23 +0800)]
ospfd: reset spf_hold_multiplier when current SPF delay state is changed

Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
7 months agotests: Simplify BGP dual-as topotest 16895/head
Donatas Abraitis [Mon, 23 Sep 2024 06:49:36 +0000 (09:49 +0300)]
tests: Simplify BGP dual-as topotest

Test if we can establish a session with a global ASN directly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16886 from LabNConsulting/aceelindem/ospf-nbr-filter-startup...
Donatas Abraitis [Mon, 23 Sep 2024 06:19:24 +0000 (08:19 +0200)]
Merge pull request #16886 from LabNConsulting/aceelindem/ospf-nbr-filter-startup-config-fix

ospfd: Interface 'ip ospf neighbor-filter' startup config not applied.

7 months agoMerge pull request #16891 from okda-networks/bgp_yang
Donald Sharp [Sun, 22 Sep 2024 19:26:35 +0000 (15:26 -0400)]
Merge pull request #16891 from okda-networks/bgp_yang

yang: added as-notation leaf to global-bgp-config

7 months agoMerge pull request #16892 from cscarpitta/tests/add-more-srv6-testcases
Donald Sharp [Sun, 22 Sep 2024 18:57:11 +0000 (14:57 -0400)]
Merge pull request #16892 from cscarpitta/tests/add-more-srv6-testcases

tests: Add more SRv6 testcases

7 months agotests: Add testcase for SRv6 End.DT6 16892/head
Carmine Scarpitta [Sun, 22 Sep 2024 05:36:12 +0000 (07:36 +0200)]
tests: Add testcase for SRv6 End.DT6

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add testcase for SRv6 End.DT4
Carmine Scarpitta [Sun, 22 Sep 2024 05:36:04 +0000 (07:36 +0200)]
tests: Add testcase for SRv6 End.DT4

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Add testcase for SRv6 End.DX6
Carmine Scarpitta [Sun, 22 Sep 2024 05:35:44 +0000 (07:35 +0200)]
tests: Add testcase for SRv6 End.DX6

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Fix unused variable warning
Carmine Scarpitta [Sun, 22 Sep 2024 05:17:58 +0000 (07:17 +0200)]
tests: Fix unused variable warning

Fix warning unused variable `router_list`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agoyang: added as-notation leaf to global-bgp-config 16891/head
ali aqrabawi [Sat, 21 Sep 2024 17:57:37 +0000 (20:57 +0300)]
yang: added as-notation leaf to global-bgp-config

Signed-off-by: ali aqrabawi <aaqrabaw@okdanetworks.com>
7 months agoMerge pull request #16889 from cscarpitta/fix/remove-duplicate-import-toopotest
Jafar Al-Gharaibeh [Sat, 21 Sep 2024 15:19:01 +0000 (10:19 -0500)]
Merge pull request #16889 from cscarpitta/fix/remove-duplicate-import-toopotest

tests: Remove duplicate `check_ping` import

7 months agoMerge pull request #16888 from cscarpitta/fix/remove-log-monitor-cli
Jafar Al-Gharaibeh [Sat, 21 Sep 2024 15:18:34 +0000 (10:18 -0500)]
Merge pull request #16888 from cscarpitta/fix/remove-log-monitor-cli

tests: Remove `log monitor XX ` from topotests

7 months agoMerge pull request #16883 from donaldsharp/bgp_dump_stuff
Jafar Al-Gharaibeh [Sat, 21 Sep 2024 15:15:19 +0000 (10:15 -0500)]
Merge pull request #16883 from donaldsharp/bgp_dump_stuff

tests: Add a very basic `dump bgp PATH..` topotest

7 months agotests: Remove duplicate `check_ping` import 16889/head
Carmine Scarpitta [Sat, 21 Sep 2024 09:17:01 +0000 (11:17 +0200)]
tests: Remove duplicate `check_ping` import

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Remove `log monitor XX` from `srv6_sid_manager` test 16888/head
Carmine Scarpitta [Sat, 21 Sep 2024 09:08:16 +0000 (11:08 +0200)]
tests: Remove `log monitor XX` from `srv6_sid_manager` test

`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Remove `log monitor XX` from `srv6_sid_manager` test
Carmine Scarpitta [Sat, 21 Sep 2024 09:08:06 +0000 (11:08 +0200)]
tests: Remove `log monitor XX` from `srv6_sid_manager` test

`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agotests: Remove `log monitor XX` from `srv6_encap_src_addr` test
Carmine Scarpitta [Sat, 21 Sep 2024 09:07:50 +0000 (11:07 +0200)]
tests: Remove `log monitor XX` from `srv6_encap_src_addr` test

`log monitor XX` command is deprecated and does nothing. Let's remove it.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
7 months agoisisd: Fix infinity flag not being set successfully 16887/head
zhou-run [Sat, 21 Sep 2024 07:19:19 +0000 (15:19 +0800)]
isisd: Fix infinity flag not being set successfully

When creating SPF neighbors and calling spf_adj_list_parse_tlv(), the F_ISIS_SPF_ADJ_METRIC_INFINITY flag is only set to a local variable flags and not set to the SPF neighbor sadj->flags. Additionally, the pseudo node metric pseudo_metric is also not reflected in the F_ISIS_SPF_ADJ_METRIC_INFINITY flag, the metric should be checked using sadj->metric.

Signed-off-by: zhou-run <zhou.run@h3c.com>
7 months agopimd: add igmp proxy cli and yang configuration
Barry A. Trent [Fri, 9 Aug 2024 22:37:01 +0000 (15:37 -0700)]
pimd: add igmp proxy cli and yang configuration

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agopimd, yang: add cli for igmp proxy
Barry A. Trent [Thu, 8 Aug 2024 22:03:06 +0000 (15:03 -0700)]
pimd, yang: add cli for igmp proxy

Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
7 months agoospfd: Interface 'ip ospf neighbor-filter' startup config not applied. 16886/head
Acee Lindem [Fri, 20 Sep 2024 20:33:43 +0000 (20:33 +0000)]
ospfd: Interface 'ip ospf neighbor-filter' startup config not applied.

When 'ip ospf neighbor-filter <filter-name>' is configured in the startup
configuration, it is in the running configuration but not applied on the
interface.

Signed-off-by: Acee Lindem <acee@lindem.com>
7 months agoMerge pull request #16881 from donaldsharp/zebra_nhg_install_fix
Jafar Al-Gharaibeh [Fri, 20 Sep 2024 19:29:20 +0000 (14:29 -0500)]
Merge pull request #16881 from donaldsharp/zebra_nhg_install_fix

zebra: Pass in ZEBRA_ROUTE_MAX instead of true

7 months agotests: Add a very basic `dump bgp PATH..` topotest 16883/head
Donald Sharp [Fri, 20 Sep 2024 17:02:51 +0000 (13:02 -0400)]
tests: Add a very basic `dump bgp PATH..` topotest

None of the bgp dump code was even tested.  Add a bit
of basic stuff that it at least generates a dump file.
This can be extended at a future time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agozebra: unlock if_table route_nodes 16882/head
Mark Stapp [Fri, 20 Sep 2024 16:09:05 +0000 (12:09 -0400)]
zebra: unlock if_table route_nodes

Must unlock if we break during iteration over any lib/table
tree.

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agozebra: Pass in ZEBRA_ROUTE_MAX instead of true 16881/head
Donald Sharp [Fri, 20 Sep 2024 14:58:46 +0000 (10:58 -0400)]
zebra: Pass in ZEBRA_ROUTE_MAX instead of true

zebra_nhg_install_kernel takes a route type.  We don't
know it at that particular spot but we should not be passing
in `true`.  Let's use ZEBRA_ROUTE_MAX to indicate we do not
know, so that the correct thing is done.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16876 from opensourcerouting/fix/ZEBRA_SEG6_LOCAL_ACTION_END_DX6_...
Donald Sharp [Fri, 20 Sep 2024 13:40:04 +0000 (09:40 -0400)]
Merge pull request #16876 from opensourcerouting/fix/ZEBRA_SEG6_LOCAL_ACTION_END_DX6_should_put_full_inaddr6

zebra: Send a correct size of ctx->nh6 for SRv6 SEG6_LOCAL_ACTION_END_DX6

7 months agoospfd: fix no ospf abr-type syntax 16853/head
Shbinging [Fri, 20 Sep 2024 07:02:35 +0000 (15:02 +0800)]
ospfd: fix no ospf abr-type syntax

Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
7 months agoMerge pull request #16874 from enkechen-panw/redist-fix
Donald Sharp [Fri, 20 Sep 2024 02:16:20 +0000 (22:16 -0400)]
Merge pull request #16874 from enkechen-panw/redist-fix

bgpd: fix misplaced arguments in bgp_redistribute_add()

7 months agoMerge pull request #16875 from opensourcerouting/fix/deprecate_json
Donald Sharp [Fri, 20 Sep 2024 02:15:14 +0000 (22:15 -0400)]
Merge pull request #16875 from opensourcerouting/fix/deprecate_json

isisd: Remove deprecated JSON fields

7 months agozebra: Send a correct size of ctx->nh6 for SRv6 SEG6_LOCAL_ACTION_END_DX6 16876/head
Donatas Abraitis [Thu, 19 Sep 2024 20:54:43 +0000 (23:54 +0300)]
zebra: Send a correct size of ctx->nh6 for SRv6 SEG6_LOCAL_ACTION_END_DX6

Fixes: f6e58d26f638d0bcdc34dfc5890669036a0129df ("zebra, sharpd: add srv6 End.DX6 support")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoisisd: Remove deprecated JSON fields 16875/head
Donatas Abraitis [Thu, 19 Sep 2024 20:44:25 +0000 (23:44 +0300)]
isisd: Remove deprecated JSON fields

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
7 months agoMerge pull request #16738 from odivlad/fix-stdout-fork
Donatas Abraitis [Thu, 19 Sep 2024 20:24:19 +0000 (22:24 +0200)]
Merge pull request #16738 from odivlad/fix-stdout-fork

lib: Attach stdout to child only if --log=stdout and stdout FD is a tty

7 months agoMerge pull request #16782 from pguibert6WIND/fix_nexthop_set_failed_message
Donatas Abraitis [Thu, 19 Sep 2024 20:23:37 +0000 (22:23 +0200)]
Merge pull request #16782 from pguibert6WIND/fix_nexthop_set_failed_message

bgpd: fix 'nexthop_set failed' error message often displayed

7 months agoMerge pull request #16872 from donaldsharp/remove_nl_addraw_l
Donatas Abraitis [Thu, 19 Sep 2024 19:19:02 +0000 (21:19 +0200)]
Merge pull request #16872 from donaldsharp/remove_nl_addraw_l

zebra: Remove nl_addraw_l

7 months agotests: adjust topotest after bgp_redistribute_add() fix 16874/head
Enke Chen [Thu, 19 Sep 2024 18:52:12 +0000 (11:52 -0700)]
tests: adjust topotest after bgp_redistribute_add() fix

In ospf_multi_vrf_bgp_route_leak, the admin distance for the
redistributed ospf route should be 110, and should remain as 110 after
it's imported into another vrf, and then downloaded to zebra.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
7 months agobgpd: fix misplaced arguments in bgp_redistribute_add()
Enke Chen [Thu, 19 Sep 2024 15:52:35 +0000 (08:52 -0700)]
bgpd: fix misplaced arguments in bgp_redistribute_add()

Fix the misplaced arguments "bhtype" and "api.distance" in
bgp_redistribute_add().

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
7 months agozebra: Remove nl_addraw_l 16872/head
Donald Sharp [Thu, 19 Sep 2024 12:28:48 +0000 (08:28 -0400)]
zebra: Remove nl_addraw_l

This function is never used.  So let's remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agoMerge pull request #16848 from enkechen-panw/ecomm-val
Donatas Abraitis [Thu, 19 Sep 2024 09:33:58 +0000 (11:33 +0200)]
Merge pull request #16848 from enkechen-panw/ecomm-val

bgpd: define val in ecommunity_val as uint8_t

7 months agoMerge pull request #16868 from sri-mohan1/srib-24-frr-a
Donatas Abraitis [Thu, 19 Sep 2024 09:33:36 +0000 (11:33 +0200)]
Merge pull request #16868 from sri-mohan1/srib-24-frr-a

bgpd: changes for code maintainability

7 months agoyang: use relative path for route-map 16873/head
Louis Scalbert [Thu, 19 Sep 2024 09:24:56 +0000 (11:24 +0200)]
yang: use relative path for route-map

f1ea52bee9 ("yang: use relative path instead of absolute one for
route-map") has introduced a route-map optimization but some paths
were not changed.

Use relative path instead absolute one everywhere.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
7 months agoisisd: Fix NHLFE entry memory leaks 16855/head
zhou-run [Fri, 13 Sep 2024 10:01:43 +0000 (18:01 +0800)]
isisd: Fix NHLFE entry memory leaks

Before adding an NHLFE entry, zebra calls nhlfe_nexthop_active_ipv4()/nhlfe_nexthop_active_ipv6() to check if there is a corresponding directly connected route for the next hop prefix of the NHLFE. If such a route exists, it directly overwrites the output interface of the NHLFE's next hop with the output interface of the directly connected route. If the output interface of the directly connected route is different from the output interface of the NHLFE's next hop, deleting the NHLFE entry later will fail because nhlfe_nhop_match() cannot find the same next hop address and output interface, leading to an NHLFE entry leak.

Establishing neighbors in ISIS only requires the existence of the neighbor's IP address and does not need the neighbor's IP address to be in the same subnet as the local IP address. When zebra creates an adjacency label entry, it uses the neighbor's IP address as the next hop. If the neighbor's IP address is not in the same subnet as the local IP address and there is a local directly connected route with the neighbor's IP address prefix, it will result in an issue where the corresponding adjacency label entry in zebra cannot be deleted.

We cannot enforce that ISIS must establish neighbors using IPv4 and IPv6 addresses in the same subnet, but we can ensure that IPv4 or IPv6 addresses in different subnets do not create adjacency labels.

Signed-off-by: zhou-run <zhou.run@h3c.com>
7 months agobgpd: changes for code maintainability 16868/head
sri-mohan1 [Thu, 19 Sep 2024 03:45:14 +0000 (09:15 +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 #16860 from LabNConsulting/aceelindem/ospf-sr-algo-vulnerability
Jafar Al-Gharaibeh [Wed, 18 Sep 2024 23:55:47 +0000 (18:55 -0500)]
Merge pull request #16860 from LabNConsulting/aceelindem/ospf-sr-algo-vulnerability

ospfd: Fix heap corruption vulnerability when parsing SR-Algorithm TLV

7 months agobgpd: define val in ecommunity_val as uint8_t 16848/head
Enke Chen [Wed, 18 Sep 2024 19:28:03 +0000 (12:28 -0700)]
bgpd: define val in ecommunity_val as uint8_t

The type of the val field in ecommunity_val is used inconsistently
in a number of places. It should be defined as uint8_t.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
7 months agoMerge pull request #16857 from donaldsharp/logger_warning
Mark Stapp [Wed, 18 Sep 2024 18:52:41 +0000 (14:52 -0400)]
Merge pull request #16857 from donaldsharp/logger_warning

tests: use logger.warning not logger.warn

7 months agoospfd: Fix heap corruption vulnerability when parsing SR-Algorithm TLV 16860/head
Acee Lindem [Wed, 18 Sep 2024 18:09:19 +0000 (18:09 +0000)]
ospfd: Fix heap corruption vulnerability when parsing SR-Algorithm TLV

When parsing the SR-Algorithm TLV in the OSPF Router Information Opaque
LSA, assure that not more than the maximum number of supported
algorithms are copied from the TLV.

Signed-off-by: Acee Lindem <acee@lindem.com>
7 months agoMerge pull request #16846 from donaldsharp/zebra_evpn_mac_cleanup
Jafar Al-Gharaibeh [Wed, 18 Sep 2024 18:04:01 +0000 (13:04 -0500)]
Merge pull request #16846 from donaldsharp/zebra_evpn_mac_cleanup

Zebra evpn mac cleanup

7 months agobgpd: cancel events once in peer_free() 16859/head
Mark Stapp [Wed, 18 Sep 2024 17:38:00 +0000 (13:38 -0400)]
bgpd: cancel events once in peer_free()

Don't need to cancel scheduled events twice in a row - just
once.

Signed-off-by: Mark Stapp <mjs@cisco.com>
7 months agoMerge pull request #16856 from donaldsharp/ospf_vrf_debugs
Jafar Al-Gharaibeh [Wed, 18 Sep 2024 16:26:50 +0000 (11:26 -0500)]
Merge pull request #16856 from donaldsharp/ospf_vrf_debugs

ospfd: Add vrf name to debug functions in ospf_zebra.c

7 months agoMerge pull request #16841 from mjstapp/fix_bgp_script
Donald Sharp [Wed, 18 Sep 2024 16:00:06 +0000 (12:00 -0400)]
Merge pull request #16841 from mjstapp/fix_bgp_script

bgpd: remove bgpd.h from bgp script header

7 months agoMerge pull request #16816 from opensourcerouting/feature/bgp_dual_as
Donald Sharp [Wed, 18 Sep 2024 15:59:16 +0000 (11:59 -0400)]
Merge pull request #16816 from opensourcerouting/feature/bgp_dual_as

bgpd: Implement BGP dual-as feature

7 months agotests: use logger.warning not logger.warn 16857/head
Donald Sharp [Wed, 18 Sep 2024 15:55:45 +0000 (11:55 -0400)]
tests: use logger.warning not logger.warn

Apparently logger.warn is being deprecated.  So let's
switch over to logger.warning.  Clearly it's better

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agobgpd: Fixup crash when leaking from default vrf for mpls vpn's
Donald Sharp [Mon, 19 Jul 2021 14:29:42 +0000 (10:29 -0400)]
bgpd: Fixup crash when leaking from default vrf for mpls vpn's

When we get a update on a route that we already have information on
from another router and that route has been leaked ensure that
we do not crash when trying to releak the code when we may want
to modify the as path.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
7 months agobgpd: copy asn for prefixes imported as type5 from a vrf
Don Slice [Mon, 7 Jun 2021 18:14:45 +0000 (14:14 -0400)]
bgpd: copy asn for prefixes imported as type5 from a vrf

When a prefix in a vrf is imported into evpn as a type5,
copy the asn of the source to make sure it is reflected
in the target vrf.

Ticket: cumuluslinux-2554562
Signed-off-by: Don Slice <dslice@nvidia.com>
7 months agobgpd: copy source vrf ASN to leaked route and block loops
Don Slice [Wed, 9 Jun 2021 20:50:20 +0000 (16:50 -0400)]
bgpd: copy source vrf ASN to leaked route and block loops

When we leak routes and are using a different ASN in the
source vrf from the target vrf, it's possible we could
create loops because of an incomplete as-path (missing
the source vrf ASN). This fix adds the source vrf ASN and
stops the importing of a BGP prefix that has the target
ASN in the as-path in the source vrf.

Signed-off-by: Don Slice <dslice@nvidia.com>
7 months agobgpd: do not allow override ASN unless hidden or auto-created
Don Slice [Fri, 4 Jun 2021 20:22:24 +0000 (16:22 -0400)]
bgpd: do not allow override ASN unless hidden or auto-created

While it's okay to allow overwriting the ASN of a bgp vrf/instance
that is either hidden or automatically created, it's dangerous to
allow it on explicitly defined instances.  If that were allowed,
a typo entering the bgp config could take down existing peering,
which would be a bad thing.

Signed-off-by: Don Slice <dslice@nvidia.com>
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>