This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DHCP shuts down Ethernet device?



I just discovered that when the DHCP task fails to find a
server, it then shuts down the Ethernet driver using the code:

    // Shut down interface so it can be reinitialized
    ifr.ifr_flags &= ~(IFF_UP | IFF_RUNNING);
    if (ioctl(s, SIOCSIFFLAGS, &ifr)) { /* set ifnet flags */
        perror("SIOCSIFFLAGS down");   
        return false;
        }

This generates a call to the _stop() method in the Ethernet
driver.

I realise that if DHCP fails, the IP stack needs to be shut
down, but stopping the ethernet device entirely keeps non-IP
stuff from working.  Does the DHCP code assume that there are
no non-IP network protocols, or is the above supposed to shut
down only IP networking on the device?  The other drivers I've
looked at all seem to shut off the interface completely.

I think I'm going to have to either comment out the above call,
or make my Ethernet driver's _stop() method into a noop...

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]