Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 2015 12:38:29 +0100 (CET)
From:      Emeric POUPON <emeric.poupon@stormshield.eu>
To:        freebsd-net <freebsd-net@freebsd.org>
Subject:   Fragment questions
Message-ID:  <522774578.25519037.1426765109046.JavaMail.zimbra@stormshield.eu>
In-Reply-To: <1199418178.25515724.1426763725517.JavaMail.zimbra@stormshield.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

I noticed two questionable things in the fragmentation code:
- in ip_fragment, we do not copy the flowid from the original mbuf to the fragmented mbuf. Therefore we may output very desynchronized fragments (first fragment emitted far later the second fragment, etc.)
- in the ip_newid macro, we do "htons(V_ip_id++))" if we do not use randomized id. In multi core systems, we may emit successive packets with the same id.

Both problems combined lead to bad packet reassembly on the remote host.

What do you think?

Emeric



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?522774578.25519037.1426765109046.JavaMail.zimbra>