How to detect TCP sequence number wrap around in a netfilter kernel module

This is a discussion on How to detect TCP sequence number wrap around in a netfilter kernel module within the Linux Networking forums, part of the Linux Forums category; Hi All, I am wrtiting a netfilter based kernel module to play around with TCP. My module is on server ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2007
Rohit
 
Posts: n/a
Default How to detect TCP sequence number wrap around in a netfilter kernel module

Hi All,
I am wrtiting a netfilter based kernel module to play around with
TCP. My module is on server application side and client connect to
it.

I am trying to keep last acknowledged numbers (most recent) for
both side of channel.
Currently i am using simpel check like if (last_ack <
new_ack_num ) && packet has ACK flag set, then update my last_ack .
So trying to update my last_ack only when i see *new* /next ack . But
this is not going to work if seq/ack numbers gets wrapped around.
because my condition should be exactly reversed of original and
should be (last_ack > new_ack_num). Till i see all the
acknowlegements upto FFFFFFFF and after that again it can be
(last_ack < new_ack_num ).

But i do not know how this can be done ?? Simple arithmatic does not
seem to help .(Correct me if i am wrong). Looks like i need to use
some mechanism that TCP uses to detect SEQ number wrap around. But
again i do not know peer are using 2 different TCP implementation
which DETECTION scheme is used by TCP.(to detect SEQ number wrap
around ). Is there anything that some RFC enforces and all TCP
implemenations adhere to it.

I need a way to detect this wrap around and change my checking
conditions accordingly.

Anything u wud like to tell me ??

Thanks ,
Rohit

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:14 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0