From owner-freebsd-hackers Sun Jun 15 08:48:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA14586 for hackers-outgoing; Sun, 15 Jun 1997 08:48:50 -0700 (PDT) Received: from helbig.informatik.ba-stuttgart.de (helbig.informatik.ba-stuttgart.de [141.31.166.22]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA14581 for ; Sun, 15 Jun 1997 08:48:46 -0700 (PDT) Received: (from helbig@localhost) by helbig.informatik.ba-stuttgart.de (8.8.5/8.8.5) id RAA29785; Sun, 15 Jun 1997 17:48:41 +0200 (MET DST) From: Wolfgang Helbig Message-Id: <199706151548.RAA29785@helbig.informatik.ba-stuttgart.de> Subject: Re: ISDN troubles: it now works In-Reply-To: <199706151214.OAA00995@yedi.iaf.nl> from Wilko Bulte at "Jun 15, 97 02:14:46 pm" To: wilko@yedi.iaf.nl (Wilko Bulte) Date: Sun, 15 Jun 1997 17:48:40 +0200 (MET DST) Cc: FreeBSD-hackers@FreeBSD.ORG, rene@freeze.iaf.nl X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Hello > > We've finally gotten ISDN/PPP to work. There were multiple problems, > including a typo in the kernel config file. > > But the best brain crusher was the fact that in isdnpppd the whole > negotiation/setup stuff about local & remote IP addresses and the default > route adding was commented out with #if 0's > > Which meant that after we finally got the dialling stuff working we > saw a message telling us which addresses were assigned to local/remote > ends of the connection. The ISP we have uses dynamic addresses. > But isdnpppd never used these adresses to re-setup the link. Cute.. > The stupid thing is that all options related to handling dynamic > adress setup are accepted like in the 'normal' pppd. But are simply > ignored. > > I really don't understand why this is done, because after changing the > #if 0 into #if 1 the protocols worked OK. That is, you need also a > small hack in the kernel: > > /* FALLTHROUGH */ > > case SIOCSIFFLAGS: > x= splimp(); > if(!(ifr->ifr_flags & IFF_UP)) { > if(sc->sc_outstate != STATE_IDLE){ > printf("bisdn: SIOCSIFFLAGS disco but fall > thru\n"); > #if wilko > isdn_disconnect(sc->sc_appl, 0); > #endif > } > sc->ipp_ppp_sc->sc_if.if_flags &= ~(IFF_UP|IFF_RUNNING); > sc->ipp_ppp_sc->sc_npmode[NP_IP]=NPMODE_ERROR; > } else { > sc->ipp_ppp_sc->sc_if.if_flags |= (IFF_UP|IFF_RUNNING); > sc->ipp_ppp_sc->sc_npmode[NP_IP]=NPMODE_PASS; > } > splx(x); > break; > > It looks like that if you want to use the address negotiation you need > to patch the above in /sys/bisdn/b_isdnipp.c If you don't the connection > is broken ('disco') on every attempt to dial. Dial is ok, and then > during the re-setup with the assigned addresses (I guess..) the connection > is dropped. > > Since I'm not an expert on this stuff I appreciate knowledgable insight/ > comments on why the #if 0 are there and why patch to the ioctl is needed. Probably because the original patchers never believed that isdnpppd would stay around that long. It was really meant to be a quick fix to enable ppp functions in bisdn (for NetBSD). Since Dec 1st 1996 we happily received the first success message about a working isdnpppd connection from Andrew Gordon. Soon after that we had the dynamic addressing stuff working by reenabling the ifdef'ed code and applying a patch similar to the one above. On the ftp.muc.ditec.de server there are two tarballs--bisdntest and bisdntest-2. They contain all kernel files and diffs to ease bisdn(ppp) kernel modification in a -current environment. They include among others the patch above. And a cute shell script from Andreas Klemm to automate the kernel patches. AFAIK bisdntest works well for FreeBSD 2.2.1 and bisdntest-2 is o.k for FreeBSD 2.2.2. (You'll have to copy bisdn-ioctl.h and bisdn-isdn.h to /sys/i386/include before starting mkbisdnkernel on systems where there is no symlink from /usr/include/machine to /sys/i386/include) Some changes to bisdntest-2 where necessary to make it work on -current. Those changes do not add any functionality to the code, they only reflect modifications in some kernel interfaces. So I hesitate to put a bisdntest-3 on the bisdn ftp server. Glad to hear that bisdn works for you with PPP and dynamic IP adresses! Wolfgang