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

Submitted by:  Valentino <blubyte>
Submitted on:  Mon 17 Sep 2012 04:00:50 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Feature RequestStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned 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>
Project 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by blubyte (Submitted the item)
  • -unavailable- added by blubyte
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 08 Dec 2014 08:58:23 PM UTCgoldsimonStatusNone=>Works For Me
      Open/ClosedOpen=>Closed
    Mon 17 Sep 2012 04:00:50 PM UTCblubyteCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1