On Wed, Apr 15, 2015 at 11:32:56AM +0200, Martin Pieuchot wrote:
> On 14/04/15(Tue) 22:49, Remi Locherer wrote:
> > >Synopsis: panic when using tun(4) with openvpn on current
> > >Category: kernel
> > >Environment:
> > System : OpenBSD 5.7
> > Details : OpenBSD 5.7-current (GENERIC.MP) #919: Mon Apr 13
> > 21:03:43 MDT 2015
> >
> > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > Architecture: OpenBSD.amd64
> > Machine : amd64
> >
> > >Description:
> >
> > I use openvpn which sets up a tun(4) interface. As soon as I start
> > using the vpn (eg. with Firefox or lynx) the system panics.
>
> Thanks for the report, could you tell me if the fix below fix this
> regression?
>
I can now confirm that this patch fixes the panic.
Thank you for looking into this!
Remi
>
> Index: net/if_tun.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if_tun.c,v
> retrieving revision 1.136
> diff -u -p -r1.136 if_tun.c
> --- net/if_tun.c 10 Apr 2015 13:58:20 -0000 1.136
> +++ net/if_tun.c 15 Apr 2015 09:29:52 -0000
> @@ -897,7 +897,7 @@ tunwrite(dev_t dev, struct uio *uio, int
> return (EAFNOSUPPORT);
> }
>
> - if (niq_enqueue(ifq, m) != 0) {
> + if (niq_enqueue(ifq, top) != 0) {
> ifp->if_collisions++;
> return (ENOBUFS);
> }
>