Date: Wed, 20 Dec 2000 00:50:20 +0200 From: Juha-Matti Liukkonen <jml@cubical.fi> To: a.schulz@smf.de Cc: freebsd-isdn@freebsd.org Subject: Re: tun bad file descriptor Message-ID: <3A3FE62C.FC390327@cubical.fi>
next in thread | raw e-mail | index | archive | help
Hi, ppp in 4.x apparently does a close(2) after opening the tun device; i4brunppp starts up with only file descriptors 0 and 1 open (to the rbch device) -> tun gets opened as 2 -> tun gets closed -> later use results in EBADF. A quick fix to i4brunppp.c makes the thing work (I know, this is ugly, but I needed it up quick...): --- i4brunppp.c-orig Wed Dec 20 00:47:32 2000 +++ i4brunppp.c Wed Dec 20 00:48:06 2000 @@ -164,6 +164,7 @@ i = getdtablesize(); for(;i >= 0; i--) + if (i != 2) close(i); /* fiddle a terminating zero after the rbch unit number */ Cheers, - Juha On Monday, 18 December, Andreas Schultz wrote: > Hello, > > I try to make a dialin-server for Windows Clients with i4b userland-ppp. = > The FreeBSD Version is 4.2 and i4b is Version 00.96.00. When I try to = > call in, the Call is answered and i4brunppp is started, but no = > ppp-Handshake is established, because of a bad file descriptor. (see = > /var/log/messages) > > Someone Ideas ? > > Best Regards > > A. Schulz -- Juha-Matti Liukkonen, Cubical Solutions Ltd Phone: +358(0)405280142 Email: jml@cubical.fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A3FE62C.FC390327>