diff --git a/src/netif/ppp/fsm.c b/src/netif/ppp/fsm.c index 16f4b679..ee549f23 100644 --- a/src/netif/ppp/fsm.c +++ b/src/netif/ppp/fsm.c @@ -553,7 +553,7 @@ fsm_timeout(void *arg) break; default: - FSMDEBUG((LOG_INFO, "%s: Timeout event in state %d (%s)!\n", + FSMDEBUG((LOG_INFO, "%s: UNHANDLED timeout event in state %d (%s)!\n", PROTO_NAME(f), f->state, ppperr_strerr[f->state])); } } diff --git a/src/netif/ppp/ipcp.c b/src/netif/ppp/ipcp.c index 3a403a0a..0ff4ce3f 100644 --- a/src/netif/ppp/ipcp.c +++ b/src/netif/ppp/ipcp.c @@ -183,20 +183,7 @@ static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */ /*** LOCAL FUNCTION DEFINITIONS ***/ /**********************************/ -/* - * Non-standard inet_ntoa left here for compat with original ppp - * sources. Assumes u32_t instead of struct in_addr. - */ - -char * -_inet_ntoa(u32_t n) -{ - struct in_addr ia; - ia.s_addr = n; - return inet_ntoa(ia); -} - -#define inet_ntoa _inet_ntoa +#define inet_ntoa(addr) ip_ntoa(((struct ip_addr*)&(addr))) /* * ipcp_init - Initialize IPCP. diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index c1e38730..13fa5ed0 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -584,7 +584,7 @@ int pppOverEthernetOpen(struct netif *ethif, const char *service_name, const cha pppControl[pd].openFlag = !0; } - /* Launch a deamon thread. */ + /* PPP session descriptor found, start PPPoE */ if (pd >= 0) { pppControl[pd].openFlag = 1; @@ -1369,6 +1369,8 @@ sifdown(int pd) PPPDEBUG((LOG_WARNING, "sifdown[%d]: bad parms\n", pd)); } else { pc->if_up = 0; + /* make sure the netif status callback is called */ + netif_set_down(&pc->netif); netif_remove(&pc->netif); PPPDEBUG((LOG_DEBUG, "sifdown: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode)); if(pc->linkStatusCB) {