tech-net archive

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

Re: destroy ppp(4) on closing tty



On Fri, Apr 04, 2008 at 09:50:57AM -0400, Greg Troxel wrote:
> Yasuoka Masahiko <yasuoka%iij.ad.jp@localhost> writes:
> 
> > I wonder why ppp(4) destroys itself when the attached tty is closed.  
> > tun(4) doesn't destroy itself when the attached device file is closed.
> >
> > Is there somebody knows the reason?
> 
> Does the ppp(4) get created when something on the tty sets line
> discipline to PPP?  If so, it makes sense to destroy on close.

What could be confusing I guess is that you can create a ppp interface
with ifconfig, then get it used by pppd through the line discipline,
which will eventually destroy it on close.

That could be fixed by a simple flag set from the cloner interface.  The
only reason ppp(4) is a cloner is so that pppd(8) can check there is
support for it by listing the cloners.  Otherwise there's no point in
letting the user do ifconfig ppp0 create.

> If a tun is created by a call on a descriptor, I'd say it too should be
> destroyed on close.  If it's created by 'ifconfig tun0 create', then it
> shouldn't be destroyed on close.

That's indeed the case.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpNSOKwtTF1H.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index