[bug #21307] tcp connect problem

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

[bug #21307] tcp connect problem

David GIRAULT-2

URL:
  <http://savannah.nongnu.org/bugs/?21307>

                 Summary: tcp connect problem
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: phant
            Submitted on: Wednesday 10/10/07 at 02:40
                Category: TCP
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release:

    _______________________________________________________

Details:

Hi all:
      I use the new version from cvs.but find when use tcp connect,only two
handshake,SYN->SYN+ACK,not send ACK,I change the tcp_process function as
follow:

tcp_process(struct tcp_pcb *pcb)
{
...

switch (pcb->state)
{
  case SYN_SENT:
       ...
       tcp_ack(pcb);
       ...
       break;
  case SYN_RCD:
       ...

}

I change "tcp_ack(pcb)" to "tcp_ack_now(pcb)",it can generate three
handshake,do you agree?
}




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by 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
|

RE: [bug #21307] tcp connect problem

Goldschmidt Simon

That seems like it could be a problem with the changed nagle algorithm.
While I didn't see that problem yet, I'll try to reproduce it tonight.

Simon

>
> URL:
>   <http://savannah.nongnu.org/bugs/?21307>
>
>                  Summary: tcp connect problem
>                  Project: lwIP - A Lightweight TCP/IP stack
>             Submitted by: phant
>             Submitted on: Wednesday 10/10/07 at 02:40
>                 Category: TCP
>                 Severity: 3 - Normal
>               Item Group: Change Request
>                   Status: None
>                  Privacy: Public
>              Assigned to: None
>              Open/Closed: Open
>          Discussion Lock: Any
>          Planned Release:
>
>     _______________________________________________________
>
> Details:
>
> Hi all:
>       I use the new version from cvs.but find when use tcp
> connect,only two handshake,SYN->SYN+ACK,not send ACK,I change
> the tcp_process function as
> follow:
>
> tcp_process(struct tcp_pcb *pcb)
> {
> ...
>
> switch (pcb->state)
> {
>   case SYN_SENT:
>        ...
>        tcp_ack(pcb);
>        ...
>        break;
>   case SYN_RCD:
>        ...
>
> }
>
> I change "tcp_ack(pcb)" to "tcp_ack_now(pcb)",it can generate
> three handshake,do you agree?
> }
>
>
>
>
>     _______________________________________________________
>
> Reply to this item at:
>
>   <http://savannah.nongnu.org/bugs/?21307>
>
> _______________________________________________
>   Message sent via/by Savannah
>   http://savannah.nongnu.org/
>
>
>
> _______________________________________________
> lwip-devel mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-devel
>


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

Re: [bug #21307] tcp connect problem

goldsimon@gmx.de

> That seems like it could be a problem with the changed nagle algorithm.
> While I didn't see that problem yet, I'll try to reproduce it tonight.
>  
Hehe, didn't check in that part yet, so it's not a problem with the
nagle algorithm.
Please turn on debug statements to let us know more.

> Simon
>
>  
>> URL:
>>   <http://savannah.nongnu.org/bugs/?21307>
>>
>>                  Summary: tcp connect problem
>>                  Project: lwIP - A Lightweight TCP/IP stack
>>             Submitted by: phant
>>             Submitted on: Wednesday 10/10/07 at 02:40
>>                 Category: TCP
>>                 Severity: 3 - Normal
>>               Item Group: Change Request
>>                   Status: None
>>                  Privacy: Public
>>              Assigned to: None
>>              Open/Closed: Open
>>          Discussion Lock: Any
>>          Planned Release:
>>
>>     _______________________________________________________
>>
>> Details:
>>
>> Hi all:
>>       I use the new version from cvs.but find when use tcp
>> connect,only two handshake,SYN->SYN+ACK,not send ACK,I change
>> the tcp_process function as
>> follow:
>>
>> tcp_process(struct tcp_pcb *pcb)
>> {
>> ...
>>
>> switch (pcb->state)
>> {
>>   case SYN_SENT:
>>        ...
>>        tcp_ack(pcb);
>>        ...
>>        break;
>>   case SYN_RCD:
>>        ...
>>
>> }
>>
>> I change "tcp_ack(pcb)" to "tcp_ack_now(pcb)",it can generate
>> three handshake,do you agree?
>> }
>>
>>
>>
>>
>>     _______________________________________________________
>>
>> Reply to this item at:
>>
>>   <http://savannah.nongnu.org/bugs/?21307>
>>
>> _______________________________________________
>>   Message sent via/by Savannah
>>   http://savannah.nongnu.org/
>>
>>
>>
>> _______________________________________________
>> lwip-devel mailing list
>> [hidden email]
>> http://lists.nongnu.org/mailman/listinfo/lwip-devel
>>
>>    
>
>
> _______________________________________________
> lwip-devel mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/lwip-devel
>
>
>  



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

[bug #21307] tcp connect problem

David GIRAULT-2
In reply to this post by David GIRAULT-2

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

I tested this (since I couldn't remember how this worked): I see SYN +
SYN-ACK when entering the pcb->connected function and ACK sent after the
connected function is left. So for me, it works fine.

Can you please stop at 'tcp_ack(pcb)' (in tcp_process() right after
TCP_EVENT_CONNECTED(); I think that's the call you wanted to change to
tcp_ack_now()) and write down the pcb->flags at that time (and post them here)
to see why it doesn't send an ACK?

As I said, for me it works fine. Also, I don't think there have been any
changes in that region for some years...

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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 #21307] tcp connect problem

David GIRAULT-2

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

1.Can you please stop at 'tcp_ack(pcb)' (in tcp_process() right after
TCP_EVENT_CONNECTED(); I think that's the call you wanted to change to
tcp_ack_now()) and write down the pcb->flags at that time (and post them
here)
to see why it doesn't send an ACK?
 
   I test it ,the result is :pcb->flags = 0;(I use today's CVS head;)

   

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by 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 #21307] tcp connect problem

David GIRAULT-2

Follow-up Comment #3, bug #21307 (project lwip):

I think the code is correct,
after calling function " tcp_ack(pcb);", when to send ACK, it is depend on
the timer, the ACK will be sent when the timer is up ( in function
tcp_slowtmr(void)).

so i think you should check your timer first.


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by 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 #21307] tcp connect problem

David GIRAULT-2

Update of bug #21307 (project lwip):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



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