[ECOS] LwIP PPP interface not coming up

Frank Pagliughi fpagliughi@mindspring.com
Thu Jun 26 13:56:00 GMT 2008


Frank Pagliughi wrote:
> Hey All,
>
> I'm trying to test out PPP with lwip. Currently I'm just trying to get 
> one of the lwip test applications, like 'tcpecho', to negotiate with a 
> host (a Linux machine over a direct serial connection). It performs 
> the negotiation, exchanges IP addresses, but it appears that maybe the 
> ppp interface never comes up on the target. I'm getting the same 
> behavior with an ARM EB55 target and an i386 PC target. I see similar 
> questions posted from a few years back, but no solution.
>
> Thanks,
> Frank
OK, I think I answered my own question. The code appears to be missing 
the call to bring up the interface when the PPP connection comes up. In 
sifup() in ppp.c, @ line 1009 it reads:

    if (netif_add(&pc->netif, ...)) {
        pc->if_up = 1;
        pc->errCode = PPPERR_NONE;
        ...

It never marks the interface "cp->netif" as being up.   A call to 
netif_set_up() appears to fix it:

    if (netif_add(&pc->netif, ...)) {
        netif_set_up(&pc->netif);
        pc->if_up = 1;
        pc->errCode = PPPERR_NONE;

This seems to have been added to the lwip sources at version 1.2.0.

Frank

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list