Re: UDP packet fragments sent in reverse order

Andi Kleen (
Fri, 4 Dec 1998 06:39:12 +0100

>Here's my problem: we get very performance sending through a
>firewall using UDP. Another OS in our office does just fine. A tcpdump
>shows that the Linux machine is taking the large UDP packets, fragmenting
>them, and sending them out in reverse order. The header is the last part
>of the UDP packet the firewall sees so it can't forward anything until
>it gets the whole UDP packet.
>Can anyone tell me why the fragments would get sent out in reverse
>order? I can't see any reason to do it and it certainly doesn't
>seem like a good idea.

It is a good idea. Fragments cannot be reassembled until the total
length is known, and it is only known with the last packet. To help
reassemblers Linux sends fragments reversed, because some reassembly
algorithms work much better when they know the length in advance.

If you really want to have this behaviour changed you could hack
ip_output.c, but there are no plans to officially change it.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at