lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #55566] ppp_free() needs to accept phase PPP_PHASE_TER


From: Robert Krakora
Subject: [lwip-devel] [bug #55566] ppp_free() needs to accept phase PPP_PHASE_TERMINATE
Date: Thu, 24 Jan 2019 20:57:55 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?55566>

                 Summary: ppp_free() needs to accept phase PPP_PHASE_TERMINATE
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: robkrakora
            Submitted on: Fri 25 Jan 2019 01:57:53 AM UTC
                Category: PPP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

ppp_free() needs to accept phase PPP_PHASE_TERMINATE.

/*
 * Release the control block.
 *
 * This can only be called if PPP is in the dead phase.
 *
 * You must use ppp_close() before if you wish to terminate
 * an established PPP session.
 *
 * Return 0 on success, an error code on failure.
 */
err_t ppp_free(ppp_pcb *pcb) {
  err_t err;
  LWIP_ASSERT_CORE_LOCKED();
  if (!(pcb->phase == PPP_PHASE_DEAD || pcb->phase == PPP_PHASE_TERMINATE)) {
    return ERR_CONN;
  }

  PPPDEBUG(LOG_DEBUG, ("ppp_free[%d]\n", pcb->netif->num));

  netif_remove(pcb->netif);

  err = pcb->link_cb->free(pcb, pcb->link_ctx_cb);

  LWIP_MEMPOOL_FREE(PPP_PCB, pcb);
  return err;
}




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?55566>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]