On Thu, 03 Feb 2000, Stanislav V. Voronyi wrote:

> I work at quite big ISP all running linux and after
> upgrade from 2.0 to 2.2 kernel we found a problem: if pppd or
> slcall was killed by SIGKILL for instance, network interface

Why do you use SIGKILL rather than SIGTERM?

> still up and it is very bad for Radius server because Radius
> decide that IP# which was used on this interface freed and can
> be used further. But since interface still UP gated continued
> to announce this address through OSPF.

There is more to this issue than meets the eye, perhaps.  The problem with
having the interface go down automatically when the modem hangs up is that
pppd then immediately loses all control of the interface.  The interface
can then be reassigned to another call before the original pppd realizes
that it's gone.  This means for instance that pppd may report 0 bytes sent
and received for the connection.

With the code the way it is, at least pppd gets to read the stats and
clean up, after the modem hangs up, before it releases the ppp interface.

In the new PPP driver in the linux 2.3.xx kernel, we have a /dev/ppp
device which gives pppd a way to control the ppp interface independently
of the tty.  This lets us fix the problem properly.  If the open instance
of /dev/ppp gets closed (e.g. by pppd dying) it marks the interface down
and releases it.

>       From other side if I would do ifconfig pppXX down or

Why would you do that?

> +             /* down interface if it is still UP */
> +             if (ppp2dev(ppp)->start) {
> +                     dev_close(ppp2dev(ppp));
> +                     unregister_netdevice(ppp2dev(ppp));
> +             }

Some comments about this code: first, wouldn't it be simpler to check
(ppp2dev(ppp)->flags & IFF_UP)?  Secondly, I am pretty sure you need to
put rtnl_lock() / rtnl_unlock() around the dev_close and probably also the
unregister_netdevice.

--
Paul Mackerras, Senior Open Source Researcher, Linuxcare, Inc.
+61 2 6262 8990 tel, +61 2 6262 8991 fax
[EMAIL PROTECTED], http://www.linuxcare.com.au/
Linuxcare.  Support for the revolution.

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

Reply via email to