aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/dco_freebsd.c
AgeCommit message (Collapse)Author
2022-08-20FreeBSD-DCO: repair device iteration to find first free interface.Gert Doering
During review/update phase, FreeBSD/DCO's ability to find the first free tun interface on "--dev tun" got broken, due to two issues: - create_interface() called msg(M_ERR|...), which is a fatal error and aborts OpenVPN, so "no retry with 'tun1' after 'tun0' failed" Change to M_WARN|M_ERRNO (= warning level, add strerror(errno), return). - open_tun_dco_generic() expects "-errno" as return value of open_tun_dco(), and breaks the loop on -EPERM. create_interface() was returning "-1" instead (ioctl() error signalling), which happens to be "-EPERM" on FreeBSD. Change create_interface() to return -errno. While at it, remove logging of errors from dco_freebsd.c::open_tun_dco() (because all errors from create_interface() would be already logged there), reducing open_tun_dco() to just a wrapper around create_interface(). Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Kristof Provost <kprovost@netgate.com> Message-Id: <20220819182439.71531-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25034.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
2022-08-13ovpn-dco: introduce FreeBSD data-channel offload supportKristof Provost
Implement data-channel offload for FreeBSD. The implementation and flow is very similar to that of the Linux DCO support. Signed-off-by: Kristof Provost <kprovost@netgate.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20220812134154.16729-2-kprovost@netgate.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24894.html Signed-off-by: Gert Doering <gert@greenie.muc.de>