https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276583
Bug ID: 276583
Summary: openvpn DSO: sys/net/if_ovpn.c return ENOSPC, need:
ENOBUF
Product: Base System
Version: 14.0-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 247920
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247920&action=edit
debug src if_ovpn.c and openvpn
**Describe the bug**
1. openvpn send short buffer in ioctl().
2. sys/net/if_ovpn.c return **ENOSPC**, need: **ENOBUF**
in openvpn.log messange
`2024-01-20 10:50:14 xxxxxx/aaaaa:45216 dco_update_peer_stat: invalid peer ID 2
returned by kernel`
**To Reproduce**
clean install from ports
**Version information **
```
root@-14:/ # pkg info -x openvpn
openvpn-2.6.8_1
```
```
root@-14:/usr/local/etc/wireguard # uname -a
FreeBSD gw-de-14 14.0-RELEASE FreeBSD 14.0-RELEASE #0
releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023
[email protected]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
```
**Additional context**
debug in freebsd:
```
root@-14:/ # cd /tmp/
root@-14:/tmp # fetch http://www.grosbein.net/freebsd/patches/if_ovpn.c.diff
if_ovpn.c.diff 1133 B 6916 kBps 00s
root@-14:/tmp # cd /usr/src/sys/net
root@-14:/usr/src/sys/net # patch < /tmp/if_ovpn.c.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- if_ovpn.c.orig 2023-11-10 07:07:53.000000000 +0700
|+++ if_ovpn.c 2024-01-19 22:30:53.478336000 +0700
--------------------------
Patching file if_ovpn.c using Plan A...
Hunk #1 succeeded at 48.
Hunk #2 succeeded at 277.
Hunk #3 succeeded at 1419.
done
root@-14:/usr/src/sys/net # cd /usr/src/sys/modules/if_ovpn
root@-14:/usr/src/sys/modules/if_ovpn # make
[Creating objdir /usr/obj/usr/src/amd64.amd64/sys/modules/if_ovpn...]
machine -> /usr/src/sys/amd64/include
.....skip
root@-14:/usr/src/sys/modules/if_ovpn # service openvpn stop
Stopping openvpn.
Waiting for PIDS: 52148.
root@-14:/usr/src/sys/modules/if_ovpn # kldunload if_ovpn
root@-14:/usr/src/sys/modules/if_ovpn # kldload
/usr/obj/usr/src/amd64.amd64/sys/modules/if_ovpn/if_ovpn.ko
root@-14:/usr/src/sys/modules/if_ovpn # service openvpn start
Starting openvpn.
root@-14:/usr/src/sys/modules/if_ovpn # sysctl net.link.openvpn.debug=1
net.link.openvpn.debug: 0 -> 1
**in /var/log/debug.log**
root@-14:/usr/local/etc/wireguard # tail -f /var/log/debug.log
Jan 22 17:29:26 -14 kernel: if_ovpn: len(4594) > ifd->ifd_len(4096)
Jan 22 17:30:06 -14 syslogd: last message repeated 1 times
Jan 22 17:32:07 -14 syslogd: last message repeated 2 times
Jan 22 17:35:07 -14 syslogd: last message repeated 3 times
Jan 22 17:35:59 -14 kernel: if_ovpn: len(4269) > ifd->ifd_len(4096)
Jan 22 17:36:07 -14 syslogd: last message repeated 1 times
Jan 22 17:38:07 -14 syslogd: last message repeated 2 times
Jan 22 17:41:07 -14 syslogd: last message repeated 3 times
Jan 22 18:16:21 -14 syslogd: last message repeated 1 times
Jan 22 18:21:25 -14 syslogd: last message repeated 5 times
```
correction, patch opepvpn in FreeBSD14:
cd /usr/ports/security/openvpn/files
fetch http://www.grosbein.net/freebsd/patches/patch-src_openvpn_dco__freebsd.c
cd ..
make clean all deinstall install
--
You are receiving this mail because:
You are the assignee for the bug.