bug in libalias?

Gleb Smirnoff glebius at FreeBSD.org
Sun Jun 19 12:16:06 GMT 2005


  While working on ng_nat + libalias in kernel, I've found that
sometimes in very rare conditions libalias produces completely
broken packets. Fortunately they also have incorrect TCP checksum,
and thus are discarded and being restransmitted. Fortunately
retransmits are not broken. This is not related to any protocol
aliasing, it is a bug in alias.c. I have two cases which are 100%
reproducible.

The first case is an ssh session to my mailbox, I can't give
reproduce recipe, sorry :)

The second case is the following: you must be behind a box
running natd(8) and have MTU of 1500, router running natd should
have 1500 MTU on both interfaces.

Now, you should run

# tcpdump -w qqq -s 1600 -vvnpi fxp0 host www.rambler.ru &
# fetch -vvv http:/www.rambler.ru
# fg
# ^C
# tcpdump -s 1600 -vXXnpr qqq | less

Look into incoming TCP segment with offset 2921:4381(1460). The first packet
is broken one. Search again for 2921:4381(1460). Now I've found the
retransmitted packet.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE


More information about the freebsd-net mailing list