opnsense-src/tests/sys/net
Kyle Evans 2bef0d54f7 kern: wg: remove overly-restrictive address family check
IPv4 packets can be routed via an IPv6 nexthop, so the handling of the
parsed address family is more strict than it needs to be.  If we have a
valid header that matches a known peer, then we have no reason to
decline the packet.

Convert it to an assertion that it matches the destination as viewed by
the stack below it, instead.  `dst` may be the gateway instead of the
destination in the case of a nexthop, so the `af` assignment must be
switched to use the destination in all cases.

Add a test case that approximates a setup like in the PR and
demonstrates the issue.

PR:		284857
Reviewed by:	markj (earlier version), zlei
Differential Revision:	https://reviews.freebsd.org/D49172
2025-03-04 13:57:34 -06:00
..
if_ovpn if_ovpn tests: destroy an if_ovpn interface before it's been used 2024-09-10 20:34:23 +02:00
routing Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dhclient_pcp.conf net tests: basic test case for bpf(4)'s ability to set vlan pcp 2021-07-26 23:13:31 +02:00
if_bridge_test.sh tests: Require python3 when using Scapy 2025-03-03 07:52:33 +00:00
if_clone_test.sh tests/net: enable if_clone_test:epair_ipv6_up_stress 2024-01-10 20:51:53 -08:00
if_epair.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
if_epair_test.sh spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
if_gif.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_lagg_test.sh lagg: enable tests that stress the configuration changes 2024-05-06 15:27:32 -07:00
if_stf.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_tun_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_vlan.sh tests: Require python3 when using Scapy 2025-03-03 07:52:33 +00:00
if_wg.sh kern: wg: remove overly-restrictive address family check 2025-03-04 13:57:34 -06:00
Makefile wg tests: Add a simple regression test case for netmap support 2024-04-20 12:04:42 -04:00
pcp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00
randsleep.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
stp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00