Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 1997 17:48:40 +0200 (MET DST)
From:      Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
To:        wilko@yedi.iaf.nl (Wilko Bulte)
Cc:        FreeBSD-hackers@FreeBSD.ORG, rene@freeze.iaf.nl
Subject:   Re: ISDN troubles: it now works
Message-ID:  <199706151548.RAA29785@helbig.informatik.ba-stuttgart.de>
In-Reply-To: <199706151214.OAA00995@yedi.iaf.nl> from Wilko Bulte at "Jun 15, 97 02:14:46 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706151548.RAA29785>