mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
This commit is contained in:
parent
2f41e2b0ec
commit
fe1bea9538
@ -1007,8 +1007,10 @@ int sifup(int pd)
|
|||||||
} else {
|
} else {
|
||||||
netif_remove(&pc->netif);
|
netif_remove(&pc->netif);
|
||||||
if (netif_add(&pc->netif, &pc->addrs.our_ipaddr, &pc->addrs.netmask, &pc->addrs.his_ipaddr, (void *)pd, pppifNetifInit, ip_input)) {
|
if (netif_add(&pc->netif, &pc->addrs.our_ipaddr, &pc->addrs.netmask, &pc->addrs.his_ipaddr, (void *)pd, pppifNetifInit, ip_input)) {
|
||||||
pc->if_up = 1;
|
|
||||||
pc->errCode = PPPERR_NONE;
|
netif_set_up(&pc->netif);
|
||||||
|
pc->if_up = 1;
|
||||||
|
pc->errCode = PPPERR_NONE;
|
||||||
|
|
||||||
PPPDEBUG((LOG_DEBUG, "sifup: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
PPPDEBUG((LOG_DEBUG, "sifup: unit %d: linkStatusCB=%lx errCode=%d\n", pd, pc->linkStatusCB, pc->errCode));
|
||||||
if(pc->linkStatusCB)
|
if(pc->linkStatusCB)
|
||||||
@ -1322,7 +1324,9 @@ static void pppInput(void *arg)
|
|||||||
* pass the result to IP.
|
* pass the result to IP.
|
||||||
*/
|
*/
|
||||||
if (vj_uncompress_tcp(&nb, &pppControl[pd].vjComp) >= 0) {
|
if (vj_uncompress_tcp(&nb, &pppControl[pd].vjComp) >= 0) {
|
||||||
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
if (pppControl[pd].netif.input != NULL) {
|
||||||
|
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Something's wrong so drop it. */
|
/* Something's wrong so drop it. */
|
||||||
@ -1340,7 +1344,9 @@ static void pppInput(void *arg)
|
|||||||
* the packet to IP.
|
* the packet to IP.
|
||||||
*/
|
*/
|
||||||
if (vj_uncompress_uncomp(nb, &pppControl[pd].vjComp) >= 0) {
|
if (vj_uncompress_uncomp(nb, &pppControl[pd].vjComp) >= 0) {
|
||||||
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
if (pppControl[pd].netif.input != NULL) {
|
||||||
|
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Something's wrong so drop it. */
|
/* Something's wrong so drop it. */
|
||||||
@ -1354,7 +1360,9 @@ static void pppInput(void *arg)
|
|||||||
break;
|
break;
|
||||||
case PPP_IP: /* Internet Protocol */
|
case PPP_IP: /* Internet Protocol */
|
||||||
PPPDEBUG((LOG_INFO, "pppInput[%d]: ip in pbuf len=%d\n", pd, nb->len));
|
PPPDEBUG((LOG_INFO, "pppInput[%d]: ip in pbuf len=%d\n", pd, nb->len));
|
||||||
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
if (pppControl[pd].netif.input != NULL) {
|
||||||
|
pppControl[pd].netif.input(nb, &pppControl[pd].netif);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user