From owner-freebsd-isdn Tue Dec 19 14:51: 3 2000 From owner-freebsd-isdn@FreeBSD.ORG Tue Dec 19 14:51:01 2000 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from kauha.saunalahti.fi (kauha.saunalahti.fi [195.197.53.227]) by hub.freebsd.org (Postfix) with ESMTP id 5683B37B400 for ; Tue, 19 Dec 2000 14:51:00 -0800 (PST) Received: from snafu.intra.net (cubical3.pp.saunalahti.fi [195.74.24.254]) by kauha.saunalahti.fi (8.10.1/8.10.1) with ESMTP id eBJMp4n05475; Wed, 20 Dec 2000 00:51:04 +0200 (EET) Received: from cubical.fi (junkyard.intra.net [192.168.2.2]) by snafu.intra.net (8.11.1/8.9.3) with ESMTP id eBJMol395126; Wed, 20 Dec 2000 00:50:51 +0200 (EET) (envelope-from jml@cubical.fi) Message-ID: <3A3FE62C.FC390327@cubical.fi> Date: Wed, 20 Dec 2000 00:50:20 +0200 From: Juha-Matti Liukkonen Organization: Cubical Solutions Ltd X-Mailer: Mozilla 4.74 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: a.schulz@smf.de Cc: freebsd-isdn@freebsd.org Subject: Re: tun bad file descriptor Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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