From nobody Mon Jun 17 18:40:17 2024 X-Original-To: freebsd-current@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 4W2zGF3vR1z5PNsj for ; Mon, 17 Jun 2024 18:40:21 +0000 (UTC) (envelope-from grembo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2zGF2LrWz4GMf; Mon, 17 Jun 2024 18:40:21 +0000 (UTC) (envelope-from grembo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718649621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PQ4uVQWsY5zGr/59XHJyo4B42qsYU4bGO4JCZb/tPAU=; b=IXVqrmcM+6JbQu7FBBllOaupmPKtA89AJHAWj+IiJZebzfVaf/znmCXBnSBS6kZWw6pNZ3 D/erOxL9d9R+eZLRymNn1WLaxE0tRrSpAEECzSHktsF6C7xxiTlT57GIiHKWzO6dytNSjA wBj8sYzSqesLn+Y1TMuN9wGMQDIr/zYwp92oBENyDYtVjkRDitRO5lyP9FvY/lFmT0FjOB boLahbYN95ESKpKJQVYamWP34bRTcbwdga0Ecmf5iBZu3OwbvkJo3rwemvPu/mqrbW2/IT alDtkCZnHYvpudBulToIptCsCmcsNbopQRWngBPJ+9RtxJJs+5cjiM0usnG3UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718649621; a=rsa-sha256; cv=none; b=UXQUFFFoTgGVN94RoyibIhej7aYklwhAtmri1jCik5di7BTV7ONyb0T/9Qid/9Oaokw+dK 0wQPvFtrKyapgRPiHmWL6cnZyhFTFrAXeu7mWUxbeA/8zof4BLPGVYU5pz6vFWp6L2p79S JpCrt6imYyv6zyKKbl3hYyO74kQtfQ1JBqH5kdPvMOFyyZDignfnz2EV5XI7hz2/PbIhbq ysKgRT4KMS3+yngaxolTeNRgJXxOSqvqA+gDj4e+c/0qmqcszTJyetuoXD6DHODHrpPpaV 20fa21Zzt/3bZm1ScepSmcJtajDENc5lyRVZcUPFyMJSO2m+Do+4mCscJu3CHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718649621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PQ4uVQWsY5zGr/59XHJyo4B42qsYU4bGO4JCZb/tPAU=; b=FJGgx8BD5460Z+1T7ILNRRmnuA2bBMGXWr1L19Ot0MlMXRCcGbhao6TMPwD1QxSBuEz1iF u8vvS3OcmyR3Em+Wbb1KbR+q/53itl+dgt9Ic+EHW40QMpwW2Dw5sAn+8EmnpnkbtbPSIn entLUwD5SFQKuRr9tUyTeVLm3TfZquD03pw0J6bpxyDWj5QPB86KI2PKeg4upi9OUWNYEP QOt6YpSqOrUuJG8ib2043fnJ2gD9JNRR/Cq25VzscGum1rQFNed0na5Fe+D7fppcwQkqsU zZ++xpUQ/Zh5eBXyYxrhmpvAbGwFE4WmZiS8M9uegV8IV7VZuFyd1685z0I8Kg== Received: from mail.evolve.de (mail.evolve.de [213.239.217.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.evolve.de", Issuer "R3" (verified OK)) (Authenticated sender: grembo/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W2zGD62b4zWFW; Mon, 17 Jun 2024 18:40:20 +0000 (UTC) (envelope-from grembo@freebsd.org) Received: by mail.evolve.de (OpenSMTPD) with ESMTPSA id 05f0cb88 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 17 Jun 2024 18:40:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: Heads-up: ifconfig address without a mask/width to become an error From: Michael Gmelin In-Reply-To: Date: Mon, 17 Jun 2024 20:40:17 +0200 Cc: Ed Maste , FreeBSD Current Message-Id: <108590EB-1A14-4565-86FD-120C6CA4F007@freebsd.org> References: To: Shawn Webb X-Mailer: iPhone Mail (20H343) > On 17. Jun 2024, at 20:34, Shawn Webb wrote: >=20 > =EF=BB=BFOn Mon, Jun 17, 2024 at 10:54:29AM -0400, Ed Maste wrote: >> It is currently possible to specify an IPv4 address without a >> netmask/width to ifconfig or in rc.conf, e.g.: >>=20 >> ifconfig_igb0=3D"192.168.0.2" >>=20 >> phk recently discovered[1] that ifconfig chose a poor netmask/width >> when none was specified. This was not an intentional change in >> defaults but rather a bug that has now been fixed by grembo@, in >> commit 8a9f0fa42b1c and merged to stable/14 in 048ad7a9ef9f. The fix >> will be in FreeBSD 14.2. I am unsure if there will be an EN update for >> 14.0/14.1. The bug does not exist in FreeBSD 13.x. >>=20 >> Specifying an IPv4 address without a mask/width has been deprecated >> since the deprecation of classful addressing. As of FreeBSD 13.1 >> ifconfig has emitted a warning when no mask/width is specified, and >> the intent was to make it an error after a sufficient amount of time >> passed. >>=20 >> I've opened a Phabricator review[2] for ifconfig to change the warning >> into an error. I included a link to the review in phk's thread, and >> asked for input on timing for landing the change. As there seems to be >> consensus to include this change in FreeBSD 15.0 I plan to commit it >> soon and am sending this note to increase the visibility of the >> upcoming change. >>=20 >> This will be prominently noted in the 15.0 release notes, and should >> be mentioned in release notes for upcoming 13.x and 14.x releases. >=20 > Hey Ed, >=20 > I hope I don't sound pathetically verbose here, but I just wanted to > make sure to remove any sense of ambiguity. >=20 > Would the "netmask " option still work? For example: >=20 > # ifconfig em0 inet 192.168.0.1 netmask 255.255.255.0 >=20 > I suspect the answer is "yes". >=20 Yes, this affects only configs without any netmask. So 192.168.0.1/24 =3D> ok 192.168.0.1 netmask 255.255.255.0 =3D> ok 192.168.0.1 =3D> deprecated now, error then Best > Thanks, >=20 > --=20 > Shawn Webb > Cofounder / Security Engineer > HardenedBSD >=20 > Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 > https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03= A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc