[PATCH] Fix ocserv tun read/write on FreeBSD

Nikos Mavrogiannopoulos nmav at gnutls.org
Sat Apr 4 10:16:12 PDT 2015


On Sun, 2015-04-05 at 01:31 +1100, Brian Chu wrote:
> On Sun, Apr 5, 2015 at 1:04 AM, Nikos Mavrogiannopoulos <nmav at gnutls.org> wrote:
> > On Sat, 2015-04-04 at 21:39 +1100, Brian Chu wrote:
> >> Hi Nikos,
> >>
> >> In commit 9d51069 you added handling for the additional 4-byte packet
> >> header that's present on OpenBSD. However, this is broken on FreeBSD
> >> because whilst TUNSIFHEAD is defined, it is not set by default. The
> >> attached patch fixes this by setting this ioctl after creating the tun
> >> device. I've also attached 2 trivial patches for fixing an extraneous
> >> return value and indentation.
> >
> > Thanks. Wouldn't however be simpler to define TUN_AF_PREFIX only in
> > OpenBSD then?
> My understanding is that IPv6 won't work if TUNSIFHEAD is not set
> (FreeBSD will assume the address family is AF_INET for all packets
> written).

Didn't know that. I'll apply your original patch then.

Thanks,
Nikos





More information about the openconnect-devel mailing list