Translation of IPv6/IPv4 FTP packets...

Eddie Kohler kohler at icir.org
Sun Feb 24 19:24:45 EST 2002


Hi Juan Luis,

Looking over your suggestion for FTPPortMapper6...

> For the translation of ftp packets, I would do an element (ej.
> FtpPortMapper6) that recives "translated" packets, one wich already has
> passed thru at and pt64 elements (in IPv6 -> IPv4 way) and is ready to be
> sent to the IPv4 network.

Seems good, except for one missing piece. When you change the data stream
of a TCP packet, you can shift the sequence numbers of every succeeding
packet. Someone must make that adjustment to both sequence numbers and
acknowledgement numbers. FTPPortMapper relies on TCPRewriter to do this:

ftpportmapper.cc:213:
      p_mapping->update_seqno_delta(buflen - port_arg_len);
      p_mapping->reverse()->update_ackno_delta(port_arg_len - buflen);

Your plan does not seem to include sequence number updating, but you can't
alter the data stream without it.

You are absolutely right, though -- your version of FTPPortMapper won't
need to install new mappings. That's only necessary because of the
unidirectionality of network address port translation (conventional NAT).

Eddie




More information about the click mailing list