Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to detect TCP sequence number wrap around in a netfilter kernel module

Reply
Thread Tools Display Modes

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

 
 
Rohit
Guest
Posts: n/a

 
      05-10-2007, 06:28 AM
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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with netfilter in a kernel module Aashay Shringarpure Linux Networking 1 03-02-2009 06:58 AM
possible issues on SMP machine for Netfilter based kernel module Rohit Linux Networking 0 05-16-2007 09:55 AM
How to get data in kernel SEND buffer for a TCP socket from a netfilter based kernel module Rohit Linux Networking 0 05-10-2007 11:27 AM
netfilter conntrack helper routine calling sequence muruga Linux Networking 1 12-08-2006 08:30 PM
killing a kernel thread ....... UDP server (kernel module)......... alex Linux Networking 0 09-20-2006 11:26 AM



1 2 3 4 5 6 7 8 9 10 11