Commit b215499
committed
dco_freebsd: use AF_LOCAL sockets for ioctl() communication with DCO driver
DCO FreeBSD uses ioctl() calls for userland -> driver communication, on
a socket() file descriptor. The original code uses AF_INET sockets,
which fails if using a kernel compiled without IPv4 support.
The kernel side ioctl() handling does not differentiate between AF_INET,
AF_INET6 and AF_LOCAL sockets, and only the latter are guaranteed to be
present.
While add it, add a clear message if the socket() call in dco_available()
fails (it will lead to disabling of DCO).
FreeBSD PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286263
Reported-by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Change-Id: I84fe7a11391eafde3660d25a3c99094a0c525f3d
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1551
Message-Id: <20260227224745.3175-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35795.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 5f19355)1 parent d88e902 commit b215499
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
| 721 | + | |
721 | 722 | | |
722 | 723 | | |
723 | 724 | | |
| |||
0 commit comments