Bradley Wendelboe <[EMAIL PROTECTED]> writes:

> I've been trying to trace why diald fails since linux 2.3.13.  Diald
> brings up the connection, but pppd does not set defaultroute, and the
> connection drops.  I added a line to ip-up to set the route, and I can
> get a good net connection, but pppd times out and brings down the link. 
> Using this method I also seem to get two default routes (sl0 and ppp0). 

I think I know the reason, but not how to fix it. The problem is in
these lines in ppp.c

/*
 * Find the interface number of the ppp device that pppd opened up and
 * do any routing we might need to do.
 * If pppd has not yet opened the device, then return 0, else return 1.
 */

int ppp_set_addrs()
{
    static int sock = -1;
    ulong laddr = 0, raddr = 0, baddr = 0;

    /* We need a socket. Any socket... */
    if (sock < 0)
        sock = socket(AF_INET, SOCK_DGRAM, 0);

    /* Try to get the interface number if we don't know it yet. */
    if (link_iface == -1) {
         /* Try the pppd-2.2.0 ioctrl first,
          * Try the pppd-2.1.2 ioctrl if that fails
          */
      
      if (ioctl(ppp_fd, PPPIOCGUNIT_2_2_0, &link_iface) == -1)
        ioctl(modem_fd, PPPIOCGUNIT_2_1_2, &link_iface);

    }

This is trying 2 mechanisms for testing if pppd is active, but kernel
2.3.13+ has introduced a 3rd mechanism (which diald is not trying)

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

Reply via email to