Followup patch to r280971. This patch mostly eliminates the use of the common IP ID values and add variables per stream as needed instead.
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Hi,
In my sketchup I assume that packets for the same destination will not be re-ordered. I see that the current ip_reass() code does not care about TCP or UDP port numbers at all. Maybe we should add code to check that the packet belongs to the same ports too?
Does somebody here know what happens in these two cases:
If we are transmitting using TSO, will the network adapter increment the IP ID field somehow? What happens if an outgoing IP packet resulting from a TSO packet get fragmented by a router?
In ip_fragment() when we create fragments we should increment the ip_id value for each fragment?
--HPS
This patch catastrophically misunderstands how IP fragmentation works. Please do not continue with this work until you have read the pertinent RFCs.
sys/netinet/ip_input.c | ||
---|---|---|
901 ↗ | (On Diff #4613) | Just to be specific about the problem: IP fragments repeat the IP header, but not the higher-level protocol headers from UDP and TCP. Therefore you not only cannot check the port numbers here (in later fragments they won't appear!) but it is also important that the IP ID space shared by an IP 2-tuple be unique. This means that your proposed changes to make them per-inpcb will lead to IP fragmentation being fundamentally broken, as fragments from different connections -- and even different protocols -- could be mixed up with one another. |