| rfc2663中不是有这么一段么?(ALG——Application Level gateway ) 7.1. FTP support
 
 "PORT" command and "PASV" response in FTP control session payload
 identify the IP address and TCP port that must be used for the data
 session it supports. The arguments to the PORT command and PASV
 response are an IP address and a TCP port in ASCII. An FTP ALG is
 required to monitor and update the FTP control session payload so
 that information contained in the payload is relevant to end nodes.
 The ALG must also update NAT with appropriate data session tuples and
 session orientation so that NAT could set up state information for
 the FTP data sessions.
 Because the address and TCP port are encoded in ASCII, this may
 result in a change in the size of packet.  For instance,
 10,18,177,42,64,87 is 18 ASCII characters, whereas
 193,45,228,137,64,87 is 20 ASCII characters. If the new size is same
 as the previous, only the TCP checksum needs adjustment as a result
 of change of data. If the new size is less than or greater than the
 previous, TCP sequence numbers must also be changed to reflect the
 change in length of FTP control data portion.  A special table may be
 used by the ALG to correct the TCP sequence and acknowledge numbers.
 The sequence number and acknowledgement correction will need to be
 performed on all future packet of the connection.
 |