Page MenuHomeFreeBSD

Patch to reduce use of global IP ID value(s)
AbandonedPublic

Authored by hselasky on Apr 2 2015, 5:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 16 2024, 5:35 AM
Unknown Object (File)
Jan 13 2024, 4:36 AM
Unknown Object (File)
Dec 20 2023, 2:18 AM
Unknown Object (File)
Dec 13 2023, 3:49 PM
Unknown Object (File)
Nov 22 2023, 7:53 PM
Unknown Object (File)
Sep 24 2023, 11:37 AM
Unknown Object (File)
Jul 9 2023, 11:28 PM
Unknown Object (File)
Jun 21 2023, 5:34 AM

Details

Reviewers
glebius
kmacy
Summary

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

hselasky retitled this revision from to Patch to reduce use of global IP ID value(s).
hselasky updated this object.
hselasky edited the test plan for this revision. (Show Details)
hselasky added reviewers: kmacy, glebius.
hselasky set the repository for this revision to rS FreeBSD src repository - subversion.
hselasky set the repository for this revision to rS FreeBSD src repository - subversion.

Style and compile fixes.

Add context to patches.
Fix minor whitespace issue.
Add comment in ip_reass().

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

rwatson requested changes to this revision.Apr 2 2015, 6:36 PM
rwatson added a reviewer: rwatson.
rwatson added a subscriber: rwatson.

This patch catastrophically misunderstands how IP fragmentation works. Please do not continue with this work until you have read the pertinent RFCs.

This revision now requires changes to proceed.Apr 2 2015, 6:36 PM
rwatson removed a reviewer: rwatson.
rwatson added inline comments.
sys/netinet/ip_input.c
901

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.

rwatson: Yes, it might not be possible to do the ip_fillid() this way.

Problem is more complicated than first anticipated.