kern/60889 - zero IP id change issues in 5.2RC2

Garrett Wollman wollman at khavrinen.lcs.mit.edu
Wed Jan 7 14:56:16 PST 2004


<<On Wed, 07 Jan 2004 23:48:30 +0100, Andre Oppermann <andre at FreeBSD.ORG> said:

>  1. Do you think it is neccessary to do a htons() on the randomized
>     ip_id too?  I'd say yes if there is a case where it has to
>     monotonically increase afterwards.  Does it?

IP IDs are nonces.  The only requirement is that they not be reused
for a packet to the same destination IP address before reassembly has
timed out.  In practice, this is impossible to guarantee, so the usual
practice is to try to ensure a complete cycle (of 16-bit numbers).
The order doesn't matter.  I prefer not byte-swapping the address, but
with a modern processor that overhead can probably be pipelined out
anyway.

-GAWollman



More information about the freebsd-net mailing list