mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
pppoe now have access to the ppp_pcb structure, removed "persist" option copy
This commit is contained in:
parent
5abdc99f3e
commit
336ba8f419
@ -164,8 +164,6 @@ struct pppoe_softc {
|
||||
#endif
|
||||
int sc_padi_retried; /* number of PADI retries already done */
|
||||
int sc_padr_retried; /* number of PADR retries already done */
|
||||
|
||||
u_int persist : 1; /* Persist mode, don't timeout sending PADI packets */
|
||||
};
|
||||
|
||||
|
||||
@ -174,7 +172,7 @@ struct pppoe_softc {
|
||||
err_t pppoe_create(struct netif *ethif, ppp_pcb *pcb, void (*link_status_cb)(ppp_pcb *pcb, int up), struct pppoe_softc **scptr);
|
||||
err_t pppoe_destroy(struct netif *ifp);
|
||||
|
||||
int pppoe_connect(struct pppoe_softc *sc, bool persist);
|
||||
int pppoe_connect(struct pppoe_softc *sc);
|
||||
void pppoe_disconnect(struct pppoe_softc *sc);
|
||||
|
||||
void pppoe_disc_input(struct netif *netif, struct pbuf *p);
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user