NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/39233: OpenSSH fails to initialize tun(4) tunnels correctly

The following reply was made to PR bin/39233; it has been noted by GNATS.

From: Taylor R Campbell <>
Subject: Re: bin/39233: OpenSSH fails to initialize tun(4) tunnels correctly
Date: Tue, 29 Jul 2008 11:48:56 -0400

    Date: Tue, 29 Jul 2008 16:58:59 +0200
    From: Quentin Garnier <>
    On Tue, Jul 29, 2008 at 10:36:31AM -0400, Taylor R Campbell wrote:
    > @@ -636,20 +639,90 @@
    >   return -1;
    >  }
    > +#if defined(__NetBSD__)
    > +
    > +static ssize_t
    > +tun_get_device_name(int tun, int mode, char *buf, size_t buflen)
    Why do you pass "tun" to that function?  I don't see the point.
    Well, there would be a point in the SSH_TUNMODE_ETHERNET case for
    SSH_TUNID_ANY, but you don't use that feature of tap(4).
 That was the idea.  It did not fully materialize.
    > +#elif defined(__OpenBSD__) || defined(__FreeBSD__)
    Is FreeBSD's tun(4) really compatible with OpenBSD's?
 Nope -- I had not carefully enough looked at this.  Turns out FreeBSD
 has pretty much the same interface as NetBSD.
    I think (although I'm not 100% certain) we use the OpenBSD version of
    OpenSSH.  The so-called portable version has code that deals with Linux
    and FreeBSD's specificities for tunnel interface handling, so I don't
    think you have to bother here.
 Yep.  I had forgotten about that.  It already supports NetBSD, too.

Home | Main Index | Thread Index | Old Index