Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Oct 2021 06:02:04 +0200
From:      Michael Gmelin <freebsd@grem.de>
To:        karels@freebsd.org
Cc:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, freebsd-net@freebsd.org
Subject:   Re: cleaning up INET: deprecating network class A/B/C
Message-ID:  <5FF02060-1DA9-4B93-907F-3F608D4B04B7@grem.de>
In-Reply-To: <202110192115.19JLFsaR006625@mail.karels.net>
References:  <202110192115.19JLFsaR006625@mail.karels.net>

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


> On 19. Oct 2021, at 23:16, Mike Karels <karels@freebsd.org> wrote:
>=20
> =EF=BB=BFRod wrote:
>=20
>>> I plan to do some cleanup of the residual code defining and using the
>>> old Internet network classes (A/B/C), which have been obsolete since
>>> CIDR took hold.  This is an outline of what I plan, as it will happen
>>> in a number of steps and reviews, and I would like feedback on some
>>> of it.
>>>=20
>>> I want to reduce the use of the obsolete definitions and interfaces,
>>> and make it less likely for them to be used going forward.  I plan
>>> to hide the Class A/B/C bit definitions unless a feature test macro
>>> is defined; that will be the default for user code for the moment.
>>> A few files in the kernel will need to define the feature test macro
>>> for now (but see the next two paragraphs).
>=20
>> Sounds good.
>=20
>>>=20
>>> Several of the uses of the historical network class macros have to
>>> do with generating a default network mask when none is provided.
>>> The worst of these is in the code for SIOCAIFADDR (add interface
>>> address).  I want to have ifconfig and/or the kernel warn about this;
>>> the default is most likely wrong.  After some time with a warning,
>>> it should become an error to set an Internet interface address
>>> without a mask (except for loopback and point-to-point interfaces,
>>> where the mask is meaningless).
>=20
>> Sounds good except that last bit, mask on loopback is
>> meaningful, especially for people like me that alrady
>> have modified systems that change loopback from 127/8
>> to 127/16.
>=20
> I'm not aware of anything that uses the mask on a loopback interface;
> are you?  There is no network route installed when the loopback address
> is set.  I think it's similar for point-to-point interfaces, where only
> the host route for the destination is added.
>=20

I=E2=80=99ve got a use case that depends on being able to set and read the n=
etmask on loopback interfaces consistently to allow orchestration and nomad f=
ingerprinters to pick it up. But that=E2=80=99s really only about those oper=
ations.

Best
Michael





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5FF02060-1DA9-4B93-907F-3F608D4B04B7>