Re: HEADS UP: 15.0-CURRENT, change to bridge(4) might break some network configurations with “Invalid argument”

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Wed, 21 May 2025 14:44:46 UTC
On 21 May 2025, at 16:40, void wrote:
> On Mon, May 19, 2025 at 11:33:50AM +0100, Lexi Winter wrote:
>> although it's possible everyone who is affected by this is already 
>> aware
>> of the change, i thought i should send a heads up anyway, if only to
>> have a single place to discuss this (since there was quite a lot of
>> discussion).
>>
>> in short, following this commit...
>>
>> b61850c4e6f "bridge(4): default net.link.bridge.member_ifaddrs to 
>> false"
>> https://cgit.freebsd.org/src/commit/?id=b61850c4e6f6b0f21b36da7238db969d9090309e
>>
>> ...it is now impossible to use a network interface which has an IP
>> address assigned to it as a bridge member, or to configure an IP
>> address on an interface which is a member of a bridge.
>
> Hi, for the sake of clarity, when you say "IP addresses assigned to it 
> as
> a bridge member", do you mean assigned via eg rc.conf on the host,
> or assigned, for example within a VM, or assigned within a bridge 
> statement? [1]
>
> I have a machine with 2x NICs with static ips assigned in the
> usual way in rc.conf. They are also bridge members (they have to be 
> otherwise the tap interfaces on the bhyve VMs wouldn't work)
> Within each vm the interfaces are assigned either static or dynamic
> IPs. I don't use vm-bhyve. Do I need to worry? [2]
>
> [1] example - /etc/rc.conf snippet on the bhyve host
>
> ifconfig_bge1="inet REDACTED.REAL.IP netmask 255.255.255.248 mtu 1500 
> media 1000baseT mediaopt full-duplex,master"
> defaultrouter="REDACTED.REAL.GATEWAY"
> ifconfig_bge1_ipv6="inet6 accept_rtadv"
> #
> #
> ifconfig_bridge1="addm bge1 addm tap10 addm tap11 addm tap12 \
> addm tap13 addm tap14 addm tap15 addm tap16 addm tap17 addm tap18 addm 
> tap19"
> #
>
> [2] because here bge1 has an ip addigned to it and is a bridge member

Yes, that is a problem. Assign REDACTED.REAL.IP to bridge1, not to bge1.

—
Kristof