Bug 212229 - IP IDs generation behavior issue
Summary: IP IDs generation behavior issue
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RC1
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-08-29 01:53 UTC by Jose Luis Duran
Modified: 2016-09-11 12:24 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Luis Duran 2016-08-29 01:53:51 UTC
FreeBSD 11.0-RC1: The `net.inet.ip.random_id` sysctl does not appear to be randomizing when set to `1`.

Tested on two bhyve virtual machines and using nmap.

FreeBSD 11.0-RC1:

    $ nmap -O -v -Pn freebsd-11.0-rc1.example.com
    ...
    IP ID Sequence Generation: All zeros
    ...

FreeBSD 10.3-RELEASE (works as expected):

    $ nmap -O -v -Pn freebsd-10.3-release.example.com
    ...
    IP ID Sequence Generation: Randomized
    ...

On 10.3-RELEASE, out of the box (`net.inet.ip.random_id=0`) the IP IDs generation behavior was "Incremental", as stated in `inet(4)`.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-08-31 14:13:47 UTC
IP ID's are zero when IP fragmentation is not used.
Comment 2 Sepherosa Ziehau 2016-09-01 08:32:34 UTC
As per rfc6864, if you have DF set, IP ID can be 0.
Comment 3 Jose Luis Duran 2016-09-11 12:24:34 UTC
If net.inet.ip.rfc6864 is disabled, 10.3 behavior is observed:

https://reviews.freebsd.org/D2177