buglwIP - A Lightweight TCP/IP stack - Bugs: bug #37376, Netif removal and active PCBs

 
 

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

bug #37376: Netif removal and active PCBs

Submitter:  Valentino <blubyte>
Submitted:  Mon 17 Sep 2012 04:00:50 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Feature Request Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  1.4.0

Mon 08 Dec 2014 08:58:23 PM UTC, comment #2: 

No input since more than 2 years. Plus it should work already (as the OP talks about TCP pcbs...)

Simon Goldschmidt <goldsimon>
Group administrator
Wed 19 Sep 2012 07:31:23 PM UTC, comment #1: 

What exactly do you want? I don't understand how/at which point you can assign a netif to a pcb.

Maybe it helps to know that netif_set_ipaddr() already removes TCP pcbs that are active on the old IP address (pcb->local_ip == netif->ip_addr). This doesn't close PCBs listening on ANY address. Also, UDP/RAW pcbs are not closed, either (as they have no 'err' callback).

But I think that would be the way to implement it.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 17 Sep 2012 04:00:50 PM UTC, original submission:  

I'd like to know if there is clean method to remove all the active PCBs due to an netif_remove call.

I do it in this way:

1) I've added a nsapi value (a value that identifies the used netif for the PCB) to the pcb struct
2) I've extended tcp.c with the implementation of the status callback called by netif_remove
3) When the netif is removed I set the nsapi to an invalid value
4) In the tcp_slowtmr I check the status of nsapi value of the PCB and if it is invalid I remove the PCB.

Is this the correct way? Could you please give me any advice about the correct way to do it?

Valentino <blubyte>

 

(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 goldsimon (Posted a comment)
  • -email is unavailable- added by blubyte (Submitted the item)
  • -email is unavailable- added by blubyte
  •  

    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
    2014-12-08 goldsimon StatusNone Works For Me
        Open/ClosedOpen Closed
    2012-09-17 blubyte Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code