From nobody Sun Oct 12 17:19:36 2025 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 4cl6fy6f75z6CFPK for ; Sun, 12 Oct 2025 17:19:54 +0000 (UTC) (envelope-from dhorn2000@gmail.com) Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (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 4cl6fy1QYQz3H7m for ; Sun, 12 Oct 2025 17:19:54 +0000 (UTC) (envelope-from dhorn2000@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=Sj0VQAoh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of dhorn2000@gmail.com designates 2607:f8b0:4864:20::e34 as permitted sender) smtp.mailfrom=dhorn2000@gmail.com Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-5a0d17db499so3339689137.3 for ; Sun, 12 Oct 2025 10:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760289588; x=1760894388; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=lwknupvs8IDQ4Vo1wbfnFni0skrwq5QqRjHznwvU7HI=; b=Sj0VQAohkoseS0h1Hbzx8fcdYdnGqMwvZ54GkgW9qHUzN2F0jvspaqzB7tIdU6aJqB v0DFzdbHOFV3RwJOJ5SAa8rPgCZYipcJ7xR7qwBC0mFSQCLpcs319qHrca6x0nkV3BUx wPQ7HoNc7Y01xDH/gSLbW6dFRhBC/2/UGcVVH7kfKg6ndaZJVmofshKlDuVgdimpuDAP kHEEwGdz/rizNC0kccKlnIzuxs97Gfg3Jc8dDHXZEbzmdiWs1zOHLV4wO2R8v/KUcJEj n6tFu1BFR0FIC8rP9hWWIpGkKb/SfsHu7p/vpmNLomPODv6iQA7sKKgDXbxsQvl+B6F4 cO4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760289588; x=1760894388; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lwknupvs8IDQ4Vo1wbfnFni0skrwq5QqRjHznwvU7HI=; b=XRC09duS4/q9TxJuaAkDnN0jMN/GFLASbb1aeLMiM29MU2J+zimn4He+KloJJPJZVP sRXw7l025KDs9KBHz2Pdn2+N6vgLrpx/UoEzUO4hgPm9VUhovOfD3wiAXi0n1pEoaBn+ oCiAEcvqaMiKFdzyKAmlFHAAQeU4d9dxGUhrQC74DydXbpbsB7D8I8+turNYUVCAfE02 gCx0EZxsex6ZunO0EVPJ415Mx8kSBiWYk+/oKeB89UNnzJKwvtv/0RsMdmzf1HjaJErJ qBCn+NNF7U5PqshYyB41t/+X/lCdI+SJKZbO+li1oaEjfDAD7iRZmO/+3VvaM+htKQ8f dPaw== X-Gm-Message-State: AOJu0YyMKCQ/FgPCMYvx6MYA8eQoJtId8MMJ+lHfsOajJ1McVajYsgIq RelXv4I1/mVC5oCV1L/k2ZjOfKwBKnj1xIgq2kU8fA3lJbJ6dZ09PaP2UzURPXvHBIf7eEpDuaZ b8A2x54A49XIYGbPNtA0LUH2W1aKjmMLMjbkWArA= X-Gm-Gg: ASbGncvNifJAc7GjeZ/bIPQ4xb1k1CqmBtWQdZgVjKWNt7Q4bufWMolN5cs3RzK7EBk sCdEnnskY+K99yBkEadYtrBRgid1/dqckrSY4okJi42Jl4wHKTscQDtIQVEkHpU4JBkDddTq9hb 2VaL3b/I81bs33ScQdZwvRWCUzD23UIslUf/1M2GKIkp1u3XXOM2yTMlILVtJitD9viI8nyQOiU i0SR+AtIJ0QmSN9CjTJ4lOOEVE1MvAObUZVaJwstpUCPrHZukxFYRT87flQGDfZItClIG/duIVr MpqQ X-Google-Smtp-Source: AGHT+IEMjbwH8GfsreYaFeV0gIJA9V6/ygX87A6PDTcjMLI6Fi8Rz1nGp8OIWlxbseTewB13JetywYsPXub92zEakzk= X-Received: by 2002:a05:6102:44cc:10b0:5d5:f556:e3e5 with SMTP id ada2fe7eead31-5d5f556e41amr3749468137.26.1760289587859; Sun, 12 Oct 2025 10:19:47 -0700 (PDT) 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 References: In-Reply-To: From: David Horn Date: Sun, 12 Oct 2025 13:19:36 -0400 X-Gm-Features: AS18NWADXYybuS1ygMGUQk3HAXiDEWDKOxFSLM8kWUej4CJlc7bwVVsEK4vNeNI Message-ID: Subject: Re: bridge and async dhcp in rc.conf To: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="00000000000096164e0640f95b07" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.82 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.82)[-0.820]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e34:from]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4cl6fy1QYQz3H7m --00000000000096164e0640f95b07 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Oct 11, 2025 at 12:17=E2=80=AFPM David Horn w= rote: > I seem to have run into a corner case with bridge support and DHCP that > seems to have a trivial fix. > > Using bridge0 with an upstream interface (em0) does not allow me to do > normal rc.conf entries for DHCP to the bridge interface (em0 is not allow= ed > to get addresses since it is a member of the bridge) I use dual-stack > IPv4/IPv6 everywhere as well. I found an example here: > https://wiki.freebsd.org/crest/the-correct-way-to-configure-bridges-in-fr= eebsd-for-ipv6-and-ipv4 > that did not work for me. I checked the handbook documentation here: > https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-b= ridging > and there are no examples for bridge DHCP on boot using /etc/rc.conf. > Please consider added example once this fix lands. > > Example /etc/rc.conf config: > > ifconfig_em0=3D"up -tso -vlanhwtso" > cloned_interfaces=3D"bridge0" > create_args_bridge0=3D"addm em0 edge em0" > ifconfig_bridge0=3D"up DHCP" > ifconfig_bridge0_ipv6=3D"inet6 auto_linklocal accept_rtadv -ifdisabled" > rtsold_enable=3D"yes" > rtsold_flags=3D"-i -m bridge0" > > The /etc/rc.conf interface variable "DHCP" normally is used to define for > the /etc/rc.d startup scripts and devd rules to automatically provide asy= nc > DHCP for interfaces at "LINK_UP" events. When debugging this, I noticed > that this does not work as expected with bridge interfaces, but does with > ethernet and 802.11 interfaces. I temporarily used "SYNCDHCP" for this > interface config and worked around the problem until my curiosity got the > best of me to debug further. > > Looking at /etc//devd/dhclient.conf, I noticed that only two media-types > are supported for async DHCP on LINK_UP. I added a third media type to > this configuration file for bridge and it started working for me. > > Submitted Bug 290173 and an improved patch here: https://reviews.freebsd.org/D53051 Answering my own question, this does not seem to impact lagg, just bridge after testing multiple scenarios of async DHCP. > --Thanks! > -_Dave H > > > > --00000000000096164e0640f95b07 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Oct 11, 2025 at 12:17=E2=80=AFPM = David Horn <dhorn2000@gmail.com> wrote:
I seem to have = run into a corner case with bridge support and DHCP that seems to have a tr= ivial fix.


Exam= ple /etc/rc.conf config:

ifconfig_em0=3D"up -= tso -vlanhwtso"
cloned_interfaces=3D"bridge0"
c= reate_args_bridge0=3D"addm em0 edge em0"
ifconfig_bridge0=3D&q= uot;up DHCP"
ifconfig_bridge0_ipv6=3D"inet6 auto_linklocal acc= ept_rtadv -ifdisabled"
rtsold_enable=3D"yes"
rtsold_fl= ags=3D"-i -m bridge0"

The /etc/rc.co= nf interface variable "DHCP" normally is used to define for the /= etc/rc.d startup scripts and devd rules to automatically provide async DHCP= for interfaces at "LINK_UP" events.=C2=A0 When debugging this, I= noticed that this does not work as expected with bridge interfaces, but do= es with ethernet and 802.11 interfaces.=C2=A0 =C2=A0I temporarily used &quo= t;SYNCDHCP" for this interface config and worked around the problem un= til my curiosity got the best of me to debug further.

<= div>Looking at /etc//devd/dhclient.conf, I noticed that only two media-type= s are supported for async DHCP on LINK_UP.=C2=A0 I added a third media type= to this configuration file for bridge and it started working for me.
=

<snip old OBE pa= tch>

Submitted Bug 290173 and an improved patch= here:=C2=A0=C2=A0https://re= views.freebsd.org/D53051

An= swering my own question, this does not seem to impact lagg, just bridge aft= er testing multiple scenarios of async DHCP.
=C2=A0
--Thanks= !
-_Dave H



=
--00000000000096164e0640f95b07--