mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Currently `close(2)` erroneously return `EOPNOTSUPP` for `PF_ROUTE` sockets.
It happened after making rtsock socket implementation self-contained (
36b10ac2cd ). Rtsock code marks socket as connected in `rts_attach()`.
`soclose()` tries to disconnect such socket using `.pr_disconnect` callback.
Rtsock does not implement this callback, resulting in the default method being
substituted. This default method returns `ENOTSUPP`, failing `soclose()` logic.
This diff restores the previous behaviour by adding custom `pr_disconnect()`
returning `ENOTCONN`.
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D38059
23 lines
552 B
Makefile
23 lines
552 B
Makefile
# $FreeBSD$
|
|
|
|
PACKAGE= tests
|
|
WARNS?= 1
|
|
|
|
TESTSDIR= ${TESTSBASE}/sys/net/routing
|
|
|
|
ATF_TESTS_C += test_rtsock_l3
|
|
ATF_TESTS_C += test_rtsock_lladdr
|
|
ATF_TESTS_C += test_rtsock_ops
|
|
ATF_TESTS_PYTEST += test_routing_l3.py
|
|
ATF_TESTS_PYTEST += test_rtsock_multipath.py
|
|
|
|
${PACKAGE}FILES+= generic_cleanup.sh
|
|
${PACKAGE}FILESMODE_generic_cleanup.sh=0555
|
|
|
|
# Most of the tests operates on a common IPv4/IPv6 prefix,
|
|
# so running them in parallel will lead to weird results.
|
|
TEST_METADATA+= is_exclusive=true
|
|
|
|
CFLAGS+= -I${.CURDIR:H:H:H}
|
|
|
|
.include <bsd.test.mk>
|