LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-03-2009, 08:40 AM   #1
berkon
LQ Newbie
 
Registered: May 2009
Location: Munich
Distribution: Suse, Redhat, Monta Vista
Posts: 2

Rep: Reputation: 0
TCP stack imediately sends RST after it receives SYN-ACK


Hi Guys,

I am dealing with WLAN on embedded Linux (mobile device). Sometimes the RF connection is lost, but that's ok since things like that tend to happen with wireless techniques. :-) After the connection is back, the mobile device tries to re-connect to the server via TCP. And most of the times, this works fine as well.

But in some cases it took very long until the device was connected via TCP again. On Wireshark I saw that the device sends "SYN" and after let's say 100ms receives a "SYN-ACK" from the server. That's fine so far. But now, instead of sending the required "ACK" back to the server (in order to finish TCP channel buildup), it sends a RST packet nearly immediately. Sometimes in even less than 4ms after receiving SYN-ACK.

In another linux forum I found something quite similar, but that guy had the "PUSH" bit set in SYN-ACK from the server, and somebody claimed that this must not be the case in packets which don't contain data. In my case the PUSH bit is definitely not set in neither SYN packets.

Some other people mentioned that this could be "by design" regarding some timers inside TCP. But I cannot imagine that TCP could be designed so poorly. I also looked at the TCP "variables" in /proc/sys/net/ipv4/tcp_* but didn't find anything suitable.

I must admit that I'm using quite an old Monta Vista linux stack. So maybe there is already a solution of which I don't know.

I would greatly appreciate your help, since this is a customer issue and they are already getting angry about this. ;-)

Thanks a lot!

Bernd
 
Old 05-03-2009, 01:09 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
How do customer complaints normally get handled in a situation like this? I'd think you would want to reproduce the problem in your testing environment (which it sounds like you have). What next? Can you test with a newer Linux installation to see if the issue is resolved? And, if so, come up with a bug fix deployment plan?

The behavior you're describing doesn't sound normal to me. I wouldn't expect a tcp handshake to time out after 4 milliseconds...
 
Old 05-03-2009, 01:56 PM   #3
berkon
LQ Newbie
 
Registered: May 2009
Location: Munich
Distribution: Suse, Redhat, Monta Vista
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your fast reply! Yes indeed I can see the issue in our lab as well. But it happens only very sporadically. Using a new distribution release is not possible, since the code is frozen regarding the OS but of course I could ask Monta Vista whether there have patches for the TCP stack on top of our version. But first of course, I need to be sure that it is really a TCP issue and I didn't just missunderstand the behaviour of TCP. But right now I don't have an explanation for what I see in Wireshark.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TCP handshake fails, SYN/ACK ignored by system. xnomad Linux - Networking 1 09-28-2011 11:10 AM
syn synack rst ahsansaifi Linux - Networking 2 03-24-2009 01:39 AM
trying to SYN after a RST justjay Linux - Networking 4 06-20-2007 09:37 AM
TCP packet flags (SYN, FIN, ACK, etc) and firewall rules TheLinuxDuck Linux - Security 12 04-28-2005 11:30 PM
How linux TCP handle (RST,SYN) at initial connection establishment syseeker Linux - Security 1 01-14-2005 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration