Date: Fri, 19 Sep 2008 12:17:00 +0200 From: Ed Schouten <ed@80386.nl> To: Maxim Sobolev <sobomax@FreeBSD.org> Cc: "current@freebsd.org" <current@FreeBSD.org> Subject: Re: Interface auto-cloning bug or feature? Message-ID: <20080919101700.GS81522@hoeg.nl> In-Reply-To: <48D2F942.4070801@FreeBSD.org> References: <48D2F942.4070801@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--4ZVTVymsHR1TEBjP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Maxim, * Maxim Sobolev <sobomax@FreeBSD.org> wrote: > I've noticed that stat/open call on /dev/tun always creates new > interface, despite the fact that existing spare interfaces may be > available. I believe that it's a bug, since the whole purpose of > auto-cloning is to create new instance only when no existing one could > be allocated. At least that's my reading of the manual page for the tun(4= ). I'd say the best way to fix this would be to convert tun and tap to devfs_[gs]et_cdevpriv() and turn tun and tap into single device nodes. That's what we've already been doing to bpf, snp, audit_pipe, etc. Unfortunately I'm no expert when it comes to our tun and tap implementations. We should eventually eliminate the dev_stdclone()/clone_create() interface. See the following URL for a list of drivers that still need to be converted: http://fxr.watson.org/fxr/ident?i=3DD_NEEDMINOR --=20 Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ --4ZVTVymsHR1TEBjP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjTfBwACgkQ52SDGA2eCwXQmACdFVPyQeiHBPcHy/kY18v+B/0r +w4An2f/M+xFhiR0tujV2bW6rwHp4CIE =xdMv -----END PGP SIGNATURE----- --4ZVTVymsHR1TEBjP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080919101700.GS81522>