From nobody Wed Nov 10 15:36:03 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 72DC2184920D; Wed, 10 Nov 2021 15:36:12 +0000 (UTC) (envelope-from mike@mail.karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4Hq88C0h9yz4lZx; Wed, 10 Nov 2021 15:36:10 +0000 (UTC) (envelope-from mike@mail.karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTPS id 1AAFa3wS018768 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 10 Nov 2021 09:36:04 -0600 (CST) (envelope-from mike@mail.karels.net) Received: (from mike@localhost) by mail.karels.net (8.16.1/8.16.1/Submit) id 1AAFa311018767; Wed, 10 Nov 2021 09:36:03 -0600 (CST) (envelope-from mike) Message-Id: <202111101536.1AAFa311018767@mail.karels.net> To: Gleb Smirnoff cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: Re: git: 20d59403961d - main - kernel: deprecate Internet Class A/B/C In-reply-to: Your message of Tue, 09 Nov 2021 22:40:05 -0800. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18765.1636558563.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Wed, 10 Nov 2021 09:36:03 -0600 X-Rspamd-Queue-Id: 4Hq88C0h9yz4lZx X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of mike@mail.karels.net has no SPF policy when checking 216.160.39.52) smtp.mailfrom=mike@mail.karels.net X-Spamd-Result: default: False [2.30 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[mike]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; DMARC_NA(0.00)[karels.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_SPAM_LONG(1.00)[1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[mike@karels.net,mike@mail.karels.net]; RCVD_NO_TLS_LAST(0.10)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[mike@karels.net,mike@mail.karels.net]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N Gleb Smirnoff wrote: > Mike, > On Tue, Nov 09, 2021 at 03:36:01PM +0000, Mike Karels wrote: > M> commit 20d59403961d531467cfab22163f49c131cc8b55 > M> Author: Mike Karels > M> AuthorDate: 2021-10-27 03:01:09 +0000 > M> Commit: Mike Karels > M> CommitDate: 2021-11-09 15:32:38 +0000 > M> = > M> kernel: deprecate Internet Class A/B/C > M> = > M> Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is d= efined; > M> define it for user level. Define IN_MULTICAST separately from IN= _CLASSD, > M> and use it in pf instead of IN_CLASSD. Stop using class for sett= ing > M> default masks when not specified; instead, define new default mas= k > M> (24 bits). Warn when an Internet address is set without a mask. > M> = > M> MFC after: 1 month > M> Reviewed by: cy > M> Differential Revision: https://reviews.freebsd.org/D32708 > Just my 2 cents. I wasn't added as reviewer of D32708 and that's > why totally missed it. IMHO, such reviews should have #network as > reviewer. I wasn't aware of #network, or I would have added it. I publicized the reviews on freebsd-net, and asked people to add themselves. There was also discussion of some parts of this, including default mask. > I'm convinced that the status of classful addressing that was left > exactly 10 years go in b365d954cc9c39e9854eeb726a60ae812e0fb2fe was > good enough. After that change the only place where classes exist > is the mask autoguessing. It was absolutely backward compatible and > not breaking any POLA. And had zero code maintainance burden! Nobody > have ever had problems with classes since. Did existence of the small > piece of code in in_aifaddr_ioctl() or class definitions in in.h > created any conflicts with development of any new code? I'm not aware of conflicts, but we are even farther from classful addressing than 10 years ago. There were still a *lot* of references in the base system, and I'm working to reduce them. Some of them are in obsolete code that isn't worth updating, some (like the *stat programs) are in mainline code. > The new /24 default is no better than classes. The only difference > that classes maintained POLA and new default doesn't. For example, > in my home network I have default router 10.0.0.1 and since it is > class A network on my VMs and test boxes I can type > # ifconfig vtnet0 10.6.6.6 > and that is going to work. With this change no longer. I suspect that /8 is by far the minority these days, even with a "Class A" net. I also use net 10 at home, and at the last several jobs, but it is subnetted in each case. I would peridically add an address, forgetting a mask, only to find that a route for 10/8 isolated the machine= . That said, my main objective was to deprecate usage without a mask, and to warn in that case. Both the kernel and ifconfig now warn when a defaul= t mask is used. In the discussion on freebsd-net and in the review, the main thought was that masks should be required. But it isn't practical to fail and return an error with no mask, at least not without a significant period with warnings, or some systems would stop coming up on the network. One reviewer was going to comment on the /24 default, but thought it was better than the previous. I'm open to hearing more opinions. Mike