Jan Kratochvil wrote:

Lemme see if I understand you:

> #!/bin/sh
> DIP=10.6.66.20 # Destination IP address of demand-dialled link
> trap "" HUP
> kill "/var/run/`ifconfig|tr '\n' '|'|sed 's/||/~/g'|tr '~' '\n'|grep $IP|cut -f 1 -d 
>' '`.pid"
> sleep 1

Unconditionally kill off the demand-dial pppd

>      /usr/sbin/pppd `tty` $IP: nodetach ...

Handle the incoming call...

> exec /usr/sbin pppd `tty` $IP: detach demand ...

When that exits, restart the demand dial

I see two problems with this:

1) If the source of the incoming call != destination of demand dial
then you lose the packets destined for the 'demand host' for the
duration of the incoming call

2) If the source of the incoming call == destination of demand dial
then there is a window where you can lose packet bound for the
demand host - packets generated between the time mgetty grabs
the lock and the point in time when the new pppd is up.  The size
of this window could be significant given modem sync time, etc.


--

Tom Riddle

Oracom, Inc.
http://www.oracom.com

Tel. +1 978.557.5710
Fax  +1 978.557.5716




-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to