[bug #1895] tcp_bind not correct

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Follow-up Comment #1, bug #1895 (project lwip):

Do you plan to create a list of allocated tcp_pcbs in state CLOSED? I think
this is the simplest solution, although I'm not sure about the amount of
changes needed...

Maybe this is enough:
- call TCP_REG(tcp_pcbs_closed, newpcb) in tcp_new()
- call tcp_pcb_remove(tcp_pcbs_closed, pcb) in tcp_connect() and
tcp_listen()

and then test tcp_pcbs_closed when binding. What do you think?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Follow-up Comment #2, bug #1895 (project lwip):

Unfortunately, I can't access
http://www.sics.se/mailing-lists/lwip.html/msg01467.html 

It seems a little outdated...

So I created my own patch including a new list of bound, unconnected tcp_pcbs
as stated in comment #1:

(file #12540)
    _______________________________________________________

Additional Item Attachment:

File name: tcp_bind1.patch                Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Update of bug #1895 (project lwip):

                  Status:                    None => Ready For Test        
             Assigned to:                    None => goldsimon              

    _______________________________________________________

Follow-up Comment #3:

I included a new pcb list, tcp_bound_pcbs like int the patch file #12540,
only there is one more tcp_pcb_remove necessary in plus to the patch: in
tcp_close() if pcb->state == CLOSED.

Thus we come to a behaviour like this.

Add pcbs to the list in tcp_bind
Remove pcbs from the list in
- tcp_close
- tcp_listen
- tcp_connect

Checked it in -> ready for test!

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Follow-up Comment #4, bug #1895 (project lwip):

Version 1.57 (my first fix) had a bug, please make sure you update to tcp.c
file version 1.58!

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Follow-up Comment #5, bug #1895 (project lwip):

Closing this as fixed.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #1895] tcp_bind not correct

Ondrej Lufinka

Update of bug #1895 (project lwip):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                    Open => Closed                


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?1895>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel