opnsense-src/tests/sys/netinet
Gleb Smirnoff c7f803c71d inpcb: fix a panic with SO_REUSEPORT_LB + connect(2) misuse
This combination doesn't make any sense.  This socket option makes sense
only on a socket that is going to be a listening one.  There are two
options here: refuse connect(2) on a socket that has the option set
previously, or ignore (and clear) the option.  After some discussion on
phabricator, we have chosen the former, for safety and consistency
reasons.  Any programmer that runs this sequence is doing something wrong
and should be informed of that with appropriate error code.

Since connect(2) is a SUS API that has a defined set of error codes, none
of which corresponds to "a socket has non-standard incompatible socket
option set", we decided to return the same error that an already listening
socket would return.

Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D49150
2025-03-06 22:57:44 -08:00
..
libalias libalias: Add support for EIM NAT 2024-12-05 16:19:13 +00:00
arp.sh netinet tests: basic garp test 2025-01-20 14:28:39 +01:00
broadcast.c tests/netinet: add few tests for sending a broadcast packet 2025-02-21 18:11:12 -08:00
carp.py sys tests: Add scapy as a required program 2025-02-12 14:40:43 +00:00
carp.sh tests: carp: Update test case unicast_v4 to catch PR 284872 2025-02-23 03:26:32 +08:00
divert.sh tests: Require python3 when using Scapy 2025-03-03 07:52:33 +00:00
fibs.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fibs_multibind_test.c fibs_multibind_test: Explicitly cast the checksum value 2025-02-08 16:05:37 +00:00
fibs_test.sh netstat: restore printing the "default" keyword, provide -nn option 2025-02-03 10:09:58 -08:00
forward.sh tests: Require python3 when using Scapy 2025-03-03 07:52:33 +00:00
igmp.py sys tests: Add scapy as a required program 2025-02-12 14:40:43 +00:00
ip6_v4mapped_test.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
ip_reass_test.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
lpm.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile tests/netinet: add few tests for sending a broadcast packet 2025-02-21 18:11:12 -08:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
output.sh netinet tests: Make test jail names unique 2024-01-27 13:51:37 -05:00
redirect.py Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
redirect.sh tests: Require python3 when using Scapy 2025-03-03 07:52:33 +00:00
so_reuseport_lb_test.c inpcb: fix a panic with SO_REUSEPORT_LB + connect(2) misuse 2025-03-06 22:57:44 -08:00
socket_afinet.c inpcb: Further restrict binding to a port owned by a different UID 2024-12-23 15:41:06 +00:00
tcp_connect_port_test.c tests: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
tcp_implied_connect.c tests/netinet: push variable 'sin' into function scope 2024-02-02 21:09:02 -08:00
tcp_md5_getsockopt.c Add tests for TCP_MD5 getsockopt 2022-06-23 15:57:56 +01:00
tcp_user_cookie.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
udp_bindings.c tests/netinet: add few tests for unconnected UDP socket 2025-02-17 15:28:51 -08:00
udp_dontroute.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
udp_io.c tests/netinet: fix UDP I/O test build 2024-03-23 09:21:13 -07:00