Commit Graph

37380 Commits

Author SHA1 Message Date
Donatas Abraitis
623fb6d996 tests: Check if built-in Lua functions are working
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-24 13:40:37 +03:00
Donatas Abraitis
4b0f4f96ac 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>
2024-09-24 13:13:50 +03:00
Donatas Abraitis
a4ed22b0b6 tests: Add a basic test to verify match peer ...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-24 12:34:19 +03:00
Donatas Abraitis
6e52dca1c2 bgpd: Return NOMATCH only if both conf_if/group does not exist
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-24 12:27:45 +03:00
Louis Scalbert
eb186bcdad 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>
2024-09-24 10:15:49 +02:00
Donatas Abraitis
74542e1fc1
Merge pull request #16902 from donaldsharp/forwarding_on_off
tests: Add v4/v6 forwarding off/on
2024-09-24 10:22:00 +03:00
Donald Sharp
ddbea65491 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>
2024-09-23 15:16:00 -04:00
Barry A. Trent
1425d4ac48 tests: add topotest for igmp proxy
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-23 11:43:40 -07:00
Barry A. Trent
bb4620d556 doc: add documentation for ip igmp proxy cli
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-23 11:43:40 -07:00
Barry A. Trent
cec07a1cc2 pimd: add show commands for igmp proxy joins
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-23 11:43:40 -07:00
Barry A. Trent
f4d3222d10 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>
2024-09-23 11:43:32 -07:00
Donatas Abraitis
bb977d13b8 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>
2024-09-23 16:55:31 +03:00
Donatas Abraitis
fcc8738bb5
Merge pull request #16859 from mjstapp/bgp_cancel_once
bgpd: cancel events once in peer_free()
2024-09-23 11:01:05 +02:00
Donatas Abraitis
8b6de50800
Merge pull request #16873 from louis-6wind/fix-yang-rmap
yang: use relative path for route-map
2024-09-23 10:44:21 +02:00
Donatas Abraitis
9616304e47
Merge pull request #16882 from mjstapp/fix_if_table_unlock
zebra: unlock if_table route_nodes
2024-09-23 10:24:52 +02:00
Donatas Abraitis
fa200e837b
Merge pull request #16887 from zhou-run/202409211508
isisd: Fix infinity flag not being set successfully
2024-09-23 10:24:36 +02:00
Shbinging
4a26e53495 ospfd: reset spf_hold_multiplier when current SPF delay state is changed
Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
2024-09-23 14:57:15 +08:00
Donatas Abraitis
89644d5bf3 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>
2024-09-23 09:49:36 +03:00
Donatas Abraitis
2599b83308
Merge pull request #16886 from LabNConsulting/aceelindem/ospf-nbr-filter-startup-config-fix
ospfd: Interface 'ip ospf neighbor-filter' startup config not applied.
2024-09-23 08:19:24 +02:00
Donald Sharp
df87ad96f6
Merge pull request #16891 from okda-networks/bgp_yang
yang: added as-notation leaf to global-bgp-config
2024-09-22 15:26:35 -04:00
Donald Sharp
74c5c62f6f
Merge pull request #16892 from cscarpitta/tests/add-more-srv6-testcases
tests: Add more SRv6 testcases
2024-09-22 14:57:11 -04:00
Carmine Scarpitta
81de5a5a99 tests: Add testcase for SRv6 End.DT6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
a963eecc4f tests: Add testcase for SRv6 End.DT4
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
31376097fc tests: Add testcase for SRv6 End.DX6
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
Carmine Scarpitta
a158a561b8 tests: Fix unused variable warning
Fix warning unused variable `router_list`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-22 07:40:50 +02:00
ali aqrabawi
e6b203092d
yang: added as-notation leaf to global-bgp-config
Signed-off-by: ali aqrabawi <aaqrabaw@okdanetworks.com>
2024-09-21 20:57:37 +03:00
Jafar Al-Gharaibeh
be9ea8099e
Merge pull request #16889 from cscarpitta/fix/remove-duplicate-import-toopotest
tests: Remove duplicate `check_ping` import
2024-09-21 10:19:01 -05:00
Jafar Al-Gharaibeh
91a3d4dc32
Merge pull request #16888 from cscarpitta/fix/remove-log-monitor-cli
tests: Remove `log monitor XX ` from topotests
2024-09-21 10:18:34 -05:00
Jafar Al-Gharaibeh
9d529ffb01
Merge pull request #16883 from donaldsharp/bgp_dump_stuff
tests: Add a very basic `dump bgp PATH..` topotest
2024-09-21 10:15:19 -05:00
Carmine Scarpitta
253991771d tests: Remove duplicate check_ping import
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-21 11:17:01 +02:00
Carmine Scarpitta
372b8762eb 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>
2024-09-21 11:09:41 +02:00
Carmine Scarpitta
1ea13efac0 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>
2024-09-21 11:09:41 +02:00
Carmine Scarpitta
ddd690968e 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>
2024-09-21 11:09:41 +02:00
zhou-run
a9af78af42 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>
2024-09-21 16:47:40 +08:00
Barry A. Trent
9b68853e0d pimd: add igmp proxy cli and yang configuration
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-20 13:44:48 -07:00
Barry A. Trent
26b67993d0 pimd, yang: add cli for igmp proxy
Signed-off-by: Barry A. Trent <barry.trent@atcorp.com>
2024-09-20 13:44:27 -07:00
Acee Lindem
77de5eeb80 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>
2024-09-20 20:39:49 +00:00
Jafar Al-Gharaibeh
bb995fb915
Merge pull request #16881 from donaldsharp/zebra_nhg_install_fix
zebra: Pass in ZEBRA_ROUTE_MAX instead of true
2024-09-20 14:29:20 -05:00
Donald Sharp
8bb70ffb26 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>
2024-09-20 13:02:51 -04:00
Mark Stapp
c40635c5c2 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>
2024-09-20 12:24:01 -04:00
Donald Sharp
58722b9448 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>
2024-09-20 11:00:11 -04:00
Donald Sharp
65609a672f
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
2024-09-20 09:40:04 -04:00
Shbinging
d2c59d68c4 ospfd: fix no ospf abr-type syntax
Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
2024-09-20 15:06:22 +08:00
Donald Sharp
40c9d64919
Merge pull request #16874 from enkechen-panw/redist-fix
bgpd: fix misplaced arguments in bgp_redistribute_add()
2024-09-19 22:16:20 -04:00
Donald Sharp
ddd100400a
Merge pull request #16875 from opensourcerouting/fix/deprecate_json
isisd: Remove deprecated JSON fields
2024-09-19 22:15:14 -04:00
Donatas Abraitis
73d01a8e40 zebra: Send a correct size of ctx->nh6 for SRv6 SEG6_LOCAL_ACTION_END_DX6
Fixes: f6e58d26f6 ("zebra, sharpd: add srv6 End.DX6 support")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-19 23:54:43 +03:00
Donatas Abraitis
17206eb818 isisd: Remove deprecated JSON fields
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-19 23:44:25 +03:00
Donatas Abraitis
74f12853c6
Merge pull request #16738 from odivlad/fix-stdout-fork
lib: Attach stdout to child only if --log=stdout and stdout FD is a tty
2024-09-19 22:24:19 +02:00
Donatas Abraitis
b5e266b032
Merge pull request #16782 from pguibert6WIND/fix_nexthop_set_failed_message
bgpd: fix 'nexthop_set failed' error message often displayed
2024-09-19 22:23:37 +02:00
Donatas Abraitis
2302e29146
Merge pull request #16872 from donaldsharp/remove_nl_addraw_l
zebra: Remove nl_addraw_l
2024-09-19 21:19:02 +02:00