buglwIP - A Lightweight TCP/IP stack - Bugs: bug #55566, ppp_free() needs to accept phase...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55566: ppp_free() needs to accept phase PPP_PHASE_TERMINATE

Submitter:  Robert Krakora <robkrakora>
Submitted:  Fri 25 Jan 2019 01:57:53 AM UTC
   
 
Category:  PPP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Need Info
Privacy:  Public Assigned to:  gradator
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.1.1

Tue 12 Feb 2019 08:05:44 PM UTC, comment #2: 

Closing due to lack of input from OP. Please re-open if necessary.

Sylvain Rochet <gradator>
Group Member
Fri 25 Jan 2019 11:48:38 AM UTC, comment #1: 

ppp_free() expect a session in the dead phase only, there are still timers running and LCP packets that are sent/received in the terminate state thus we can't just free the control block at this stage.

Writing a bug report just telling to change something without explaining why is not helpful, especially when the issue is not obvious. What is the issue ?

Sylvain

Sylvain Rochet <gradator>
Group Member
Fri 25 Jan 2019 01:57:53 AM UTC, original submission:  

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;
}

Robert Krakora <robkrakora>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gradator (Posted a comment)
  • -email is unavailable- added by robkrakora (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-12 gradator Open/ClosedOpen Closed
    2019-01-25 gradator StatusNone Need Info
        Assigned toNone gradator

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code