help understanding a source comment (ip_conntrack)
Good morning, i did not understand what problems are concerned with
"The checked segment is in window, but our windows are *not* equivalent with the ones of the sender/receiver"
I have a problem programming a nat module for linux kernel and i would like to understand the problem pointed out in this comment to see if it could be the cause of malfunction.
When translating addresses and ports, is it necessary to deal with windows or other parameters such as seq/ack numbers? (I don't touch payload, just ips and ports).
Thanks in advance, Giacomo.
The comment is extracted from ip_conntrack_proto_tcp.c
/*
* The TCP state transition table needs a few words... *
* We are the man in the middle. All the packets go through us
* but might get lost in transit to the destination.
* It is assumed that the destinations can't receive segments
* we haven't seen.
*
* The checked segment is in window, but our windows are *not*
* equivalent with the ones of the sender/receiver. We always
* try to guess the state of the current sender.
*
* The meaning of the states are:
*
* NONE: initial state
....
Hi,
Quoted 4 lines · Giacomo
Good morning, i did not understand what problems are concerned with
"The checked segment is in window, but our windows are *not* equivalent with the ones of the sender/receiver"
The TCP connection tracking does not (and cannot) keep track the real states and parameters of the sender or the receiver absolutely. For example our windows (in both directions) may be larger than that of the sender and receiver. The comment is an explicit note to the person who wants to play with the code in order not to forget about the limitations. Think about a packet we detect and take into acount which then get lost in transit to the receiver.
Quoted 8 lines
I have a problem programming a nat module for linux kernel and i would like to understand
the problem pointed out in this comment to see if it could be the cause of malfunction.When translating addresses and ports, is it necessary to deal with windows or other parameters
such as seq/ack numbers? (I don't touch payload, just ips and ports).
You don't need to care about seq/ack if you don't touch the payload.
Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary