From nobody Sun May 18 18:53:14 2025 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 4b0qhr4V5Fz5wdsL for ; Sun, 18 May 2025 18:53:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b0qhr3hhBz3Nmx for ; Sun, 18 May 2025 18:53:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3a36e090102so186213f8f.2 for ; Sun, 18 May 2025 11:53:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747594406; x=1748199206; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cxNCOaLBDctQmHJe4XBDE13MxnVkI2C56g2bAfdEddU=; b=giZTcS7u/rA0mZaBlnYkUGIptI+fbzjgG125VhJL78D9LZzoiHq5HrLATPPD7T/BaY 4ydsYA8RHq9A1HSWvqIRL1wOF+lRx2QmaXS1u14shchm+w3PTuqQJdKq7+tf2RKITG3W iMG95Xlv+6IwrtHWKUN4vPjOrm9G9JRptY1oRxTrFQ8YGGxC0Q312mRMAzovj8PviLM4 it2cin6VIhXGnwKsHOxTJ9FgUbU+rTez1Wl9HTeK/AGFlthljv2VxPjW1+S9vTQq0k2k HN1TYNfCRx7PbYSotqwycAYf0c2OvmwYiFFT1CD7B5MSP0A11FczYWUGcRrB+QZJ2uYZ Ocxw== X-Forwarded-Encrypted: i=1; AJvYcCUJghf4VGr7RsHu8e8/yazzDmj926+93wh9149gJGZxUbv26jpE9azpRvd8CRZsT5RpfIO7wsXGXV8szgJ6ZO1QvuF7@freebsd.org X-Gm-Message-State: AOJu0YxlLT13KnyUeSI/A6GhW9AY6ub9ap7X6N4Y6AVojMgYavYHpdWT xwCIOOWSOJ5JUm7dfejf961hZNYqlidqakR6nMA/pDEd/wq5T1ekjokqEoPZHzJu+oU= X-Gm-Gg: ASbGnct0O/u8zHfawnT8hyeQ2yKlkdeCI2Gg+g/AkoiRLjnpZJHoAJhUuveS5tpVxym w2oO0+3ohGcomwNjctawTZxJebIV8Sg3F7xmLeszUlEK9B+DAbV9qt+OH0Ij+A054wTKFYAKajl o8+R55gj9b2em61FdfSkO+L8VET+m3n4JPvtt78xn0A4RKJTaVFnrBMsEryV0kL4yqG/9GThGRS 6RS6bTZWni3XB2pQTRgvTjzGtJqMZNyaoUfTqIbMoiEj8Jzqg/YOxlj+HzgUuBvTiWyjCGbssEC TH3z/I/Vv2M805e537t+0Xo80Hw1t6+oSyl1XNdV4cM9PTk9vqHsf75TOSF0OP1JIA== X-Google-Smtp-Source: AGHT+IH9Godj5jPni06aJFjWjOd5QM55p9n9PUIZbYwX/jAym1nRHTbLORqnS/6YrIY1ORgeejknow== X-Received: by 2002:a05:6000:2012:b0:3a3:5b88:fb2a with SMTP id ffacd0b85a97d-3a35c808a9cmr10548261f8f.7.1747594405739; Sun, 18 May 2025 11:53:25 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca4d263sm9978793f8f.3.2025.05.18.11.53.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 May 2025 11:53:25 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Re: git: b61850c4e6f6 - main - bridge(4): default net.link.bridge.member_ifaddrs to false From: Jessica Clarke In-Reply-To: Date: Sun, 18 May 2025 19:53:14 +0100 Cc: Lexi Winter , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202505150004.54F04FhR046897@gitrepo.freebsd.org> To: Mitchell Horne X-Mailer: Apple Mail (2.3826.500.181.1.5) X-Rspamd-Queue-Id: 4b0qhr3hhBz3Nmx X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Spamd-Bar: ---- On 17 May 2025, at 22:18, Mitchell Horne wrote: > On 5/14/25 21:04, Lexi Winter wrote: >> The branch main has been updated by ivy: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db61850c4e6f6b0f21b36da7238db969d= 9090309e >>=20 >> commit b61850c4e6f6b0f21b36da7238db969d9090309e >> Author: Lexi Winter >> AuthorDate: 2025-05-14 14:26:24 +0000 >> Commit: Lexi Winter >> CommitDate: 2025-05-15 00:02:52 +0000 >>=20 >> bridge(4): default net.link.bridge.member_ifaddrs to false >>=20 >> As discussed on arch@, this behaviour is broken and confuses = users, so >> disable it by default. For 15.0-RELEASE, allow it to be = re-enabled >> using a sysctl, but the sysctl will be removed in 16.0R. >>=20 >=20 > Hi Lexi, >=20 > I just updated my workstation past this commit. I found that my main > ethernet interface didn't receive an IP address, and had to set the > sysctl to proceed as before. >=20 > I have the following network configuration lines in my rc.conf: >=20 > ifconfig_re0=3D"DHCP" > cloned_interfaces=3D"bridge0 tap0" > ifconfig_bridge0=3D"addm re0 addm tap0 up" I also have a setup like this, as I suspect many do. The handbook even gives this configuration in places[1] (though note it=E2=80=99s = inconsistent in whether the interface or bridge should have the address). The lack of interaction with devd to automatically run dhclient as re0 comes and goes is also rather sucky, especially if re0 is wlan0. I appreciate that there may well be good technical reasons why this shouldn=E2=80=99t = be what people do, but (a) it is for specifically this case and I think it=E2=80=99s a bit shortsighted to go and break something we still = document today as correct (b) the UX needs improving specifically for bridging a real interface to one or more tap ones before we enforce this. Jess [1] = https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-= bhyve-prep > The simple setup is so that I can pass the tap0 device to QEMU/bhyve = VMs > for networking. >=20 > What adjustment do I need to make to the above configuration to = achieve > the intended result "correctly"? I understand it is probably an easy > fix, but I have a neanderthal's understanding of ifconfig :) >=20 > Many thanks, > Mitchell >=20 >> Relnotes: yes >> Reviewed by: kp, des >> Approved by: des (mentor) >> Differential Revision: https://reviews.freebsd.org/D50328 >> --- >> UPDATING | 5 +++++ >> share/man/man4/bridge.4 | 18 ++++++++++++------ >> sys/net/if_bridge.c | 4 ++-- >> 3 files changed, 19 insertions(+), 8 deletions(-) >>=20 >> diff --git a/UPDATING b/UPDATING >> index d46db9e13794..ce2b60ea9353 100644 >> --- a/UPDATING >> +++ b/UPDATING >> @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS = SLOW: >> world, or to merely disable the most expensive debugging = functionality >> at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >>=20 >> +20250513: >> + The bridge(4) sysctl net.link.bridge.member_ifaddrs now defaults to = 0, >> + meaning that interfaces added to a bridge may not have IP addresses >> + assigned. Refer to bridge(4) for more information. >> + >> 20250507: >> UMASS quirks and auto-quirk probing has been overhauled. CAM now = won't >> send SYNCHRONIZE CACHE unless MODE PAGE 8 is present and valid. This >> diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 >> index 2c3bfd6aedfa..45dea82325bc 100644 >> --- a/share/man/man4/bridge.4 >> +++ b/share/man/man4/bridge.4 >> @@ -36,7 +36,7 @@ >> .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF = ADVISED OF THE >> .\" POSSIBILITY OF SUCH DAMAGE. >> .\" >> -.Dd May 5, 2025 >> +.Dd May 13, 2025 >> .Dt IF_BRIDGE 4 >> .Os >> .Sh NAME >> @@ -163,14 +163,20 @@ To allow the host to communicate with bridge = members, IP addresses >> should be assigned to the >> .Nm >> interface itself, not to the bridge's member interfaces. >> -Assigning IP addresses to bridge member interfaces is unsupported, = but >> -for backward compatibility, it is permitted if the >> +Attempting to assign an IP address to a bridge member interface, or = add >> +a member interface with an assigned IP address to a bridge, will = return >> +an >> +.Dv EINVAL >> +.Dq ( "Invalid argument" ) >> +error. >> +For compatibility with older releases where this was permitted, = setting >> +the >> .Xr sysctl 8 >> variable >> .Va net.link.bridge.member_ifaddrs >> -is set to 1, which is the default. >> -In a future release, this sysctl may be set to 0 by default, or may = be >> -removed entirely. >> +to 1 will permit this configuration. >> +This sysctl variable will be removed in >> +.Fx 16.0. >> .Sh IPV6 SUPPORT >> .Nm >> supports the >> diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c >> index 199418c4aa99..475977adf68a 100644 >> --- a/sys/net/if_bridge.c >> +++ b/sys/net/if_bridge.c >> @@ -504,10 +504,10 @@ SYSCTL_BOOL(_net_link_bridge, OID_AUTO, = log_mac_flap, >> "Log MAC address port flapping"); >>=20 >> /* allow IP addresses on bridge members */ >> -VNET_DEFINE_STATIC(bool, member_ifaddrs) =3D true; >> +VNET_DEFINE_STATIC(bool, member_ifaddrs) =3D false; >> #define V_member_ifaddrs VNET(member_ifaddrs) >> SYSCTL_BOOL(_net_link_bridge, OID_AUTO, member_ifaddrs, >> - CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(member_ifaddrs), true, >> + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(member_ifaddrs), false, >> "Allow layer 3 addresses on bridge members"); >>=20 >> static bool