Page MenuHomeFreeBSD

kernel: deprecate Internet Class A/B/C

Authored by karels on Oct 28 2021, 2:16 PM.
Referenced Files
Unknown Object (File)
Tue, Jun 18, 7:46 PM
Unknown Object (File)
Sat, Jun 1, 11:12 PM
Unknown Object (File)
Apr 30 2024, 4:18 PM
Unknown Object (File)
Apr 30 2024, 4:50 AM
Unknown Object (File)
Apr 29 2024, 8:29 AM
Unknown Object (File)
Apr 26 2024, 6:25 AM
Unknown Object (File)
Apr 25 2024, 1:12 PM
Unknown Object (File)
Apr 24 2024, 1:29 AM



Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined;
define it for user level. Define IN_MULTICAST separately from IN_CLASSD,
and use it in pf instead of IN_CLASSD. Stop using class for setting
default masks when not specified; instead, define new default mask
(24 bits). Warn when an Internet address is set without a mask.

Test Plan

tested with full build

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 42413
Build 39301: arc lint + arc unit

Event Timeline


Why is 0xff000000 right here? I know it is historical behavior, but what is its root? Does it deserve a comment?


I don't know why this value is used. It may deserve a comment, but I wouldn't know what to say.

Other than answering Warner's question (documenting 0xff000000), LGTM.

This revision is now accepted and ready to land.Oct 30 2021, 3:00 AM

Otherwise LTGM too from scrolling through.


I was going to argue that a /24 doesn't make much sense anymore these days in most places and if one doesn't give a netmask it should probably be a /32 used here but then I saw the old "else" case above and though "okay".

One 2nd though has anyone tested

ifconfig lo0 inet gets the correct mask? Is that handled somewhere?


Agreed that /24 often isn't right, but /8 and /16 are less likely to be right. I'd love to make it an error not to specify a mask, but that would make some systems fail to come up suddenly.

About lo0: the command listed would default to a /24, although the standard is set by the network scripts to /8. Does it matter what the mask is on loopback? The only route is to our own address.

This revision now requires review to proceed.Nov 4 2021, 7:23 PM
This revision is now accepted and ready to land.Nov 5 2021, 4:57 PM
This revision was automatically updated to reflect the committed changes.