netdev
[Top] [All Lists]

Re: [PATCH] dynamic IP support for 2.4.0 (SIOCKILLADDR)

To: "Albert D. Cahalan" <acahalan@xxxxxxxxxx>
Subject: Re: [PATCH] dynamic IP support for 2.4.0 (SIOCKILLADDR)
From: "John Fremlin" <vii@xxxxxxxxxx>
Date: 30 Jan 2001 00:43:32 +0000
Cc: <linux-kernel@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <paulus@xxxxxxxxxxxxx>, <linux-ppp@xxxxxxxxxxxxxxx>, <linux-net@xxxxxxxxxxxxxxx>
In-reply-to: "Albert D. Cahalan"'s message of "Sun, 28 Jan 2001 21:45:02 -0500 (EST)"
References: <200101290245.f0T2j2Y438757@xxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (GTK)
"Albert D. Cahalan" <acahalan@xxxxxxxxxx> writes:
[...]

> > I patched userspace ppp-2.4.0 to use this functionality. It would be
> > better if SIOCKILLADDR were not used until we are sure that the new IP
> > is in fact different from the old one, but pppd in demand mode would
> 
> I get the same IP about 2/3 of the time, so it is pretty important
> to avoid killing connections until after the new IP is known.

I'll try to explain again. If you have an existing (e.g. ssh)
connection to a host across the interface, and the interface comes
down then pppd _will not bring it up again_ until you try to start a
new connection, as far as I have experienced. Therefore you will get
the old behaviour and my patch will do nothing. I decided it was
better to inform ssh that the link was dead.

Like I said, the solution to this is to make pppd cleverer about
bringing the link up when there are existing
connections. Alternatively, you could have some dubious script parsing
netstat checking whether there are connections over the interface.
and pinging hosts at intervals to bring the link up again ;-)

Here is a patch for pppd-2.4.0 orig that will give you the behaviour
you want, provided you can solve the problem in the first
paragraph. It almost exactly the same as my last patch. It compiles
and everything. Note that there are no changes required to the kernel
side patch to enable this functionality.

Attachment: ppp-2.4.0-killaddr-smarter.patch
Description: Text Data

-- 

        http://www.penguinpowered.com/~vii
<Prev in Thread] Current Thread [Next in Thread>