mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 08:33:39 +08:00
pppoe now have access to the ppp_pcb structure, removed "persist" option copy
This commit is contained in:
@@ -472,7 +472,7 @@ int ppp_over_ethernet_open(ppp_pcb *pcb, struct netif *ethif, const char *servic
|
||||
return PPPERR_OPEN;
|
||||
}
|
||||
|
||||
pppoe_connect(pcb->pppoe_sc, pcb->settings.persist);
|
||||
pppoe_connect(pcb->pppoe_sc);
|
||||
return pcb->unit;
|
||||
}
|
||||
|
||||
@@ -1713,7 +1713,7 @@ static void ppp_over_ethernet_link_status_cb(ppp_pcb *pcb, int state) {
|
||||
if(pcb->settings.persist) {
|
||||
if(pcb->link_status_cb)
|
||||
pcb->link_status_cb(pcb->link_status_ctx, pcb->err_code ? pcb->err_code : pppoe_err_code, NULL);
|
||||
pppoe_connect(pcb->pppoe_sc, pcb->settings.persist);
|
||||
pppoe_connect(pcb->pppoe_sc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ pppoe_timeout(void *arg)
|
||||
*/
|
||||
if(sc->sc_padi_retried < 100000)
|
||||
sc->sc_padi_retried++;
|
||||
if (!sc->persist && sc->sc_padi_retried >= PPPOE_DISC_MAXPADI) {
|
||||
if (!sc->pcb->settings.persist && sc->sc_padi_retried >= PPPOE_DISC_MAXPADI) {
|
||||
#if 0
|
||||
if ((sc->sc_sppp.pp_if.if_flags & IFF_LINK1) == 0) {
|
||||
/* slow retry mode */
|
||||
@@ -802,7 +802,7 @@ pppoe_timeout(void *arg)
|
||||
|
||||
/* Start a connection (i.e. initiate discovery phase) */
|
||||
int
|
||||
pppoe_connect(struct pppoe_softc *sc, bool persist)
|
||||
pppoe_connect(struct pppoe_softc *sc)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -815,7 +815,6 @@ pppoe_connect(struct pppoe_softc *sc, bool persist)
|
||||
sc->sc_session = 0;
|
||||
sc->sc_padi_retried = 0;
|
||||
sc->sc_padr_retried = 0;
|
||||
sc->persist = persist;
|
||||
#ifdef PPPOE_SERVER
|
||||
/* wait PADI if IFF_PASSIVE */
|
||||
if ((sc->sc_sppp.pp_if.if_flags & IFF_PASSIVE)) {
|
||||
|
||||
Reference in New Issue
Block a user