bridge: Restore ABI compatibility with 14.x

When new fields were added to struct ifbreq in 15.0, the decision was
made to not use the padding to preserve binary compatibility.  However
this causes some issues, including the inability for 14.x jails to use
bridges, and a failure to bring up networking when booting a 15 kernel
with a 14.x userland, e.g. during upgrade.

Restore the old size of struct ifbreq by eating some of the padding.
This only requires 4 bytes of padding; we have 28 bytes left, and in
the medium term this problem will be solved with a netlink interface,
so running out of padding should not be a concern.

Fixes:	65ed1a035c ("bridge: allow member interface vlan to be configured")
Fixes:	f94c370de6 ("bridge: Allow VLAN protocol to be configured")
Reviewed by:	zlei, kevans, flo
Differential Revision:	https://reviews.freebsd.org/D52028
This commit is contained in:
Lexi Winter
2025-08-23 00:43:48 +01:00
parent e39c9ac213
commit 110a2fa97d
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -27,6 +27,15 @@ 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".)
20250823:
To restore bridge(4)'s ABI compatibility with ifconfig from 14.x or
earlier, the size of struct ifbreq has changed, so you must update
the kernel and /sbin/ifconfig at the same time or you will not be
able to add interfaces to bridge. This is particularly important
if you require bridge for network access during boot, in which case
you should install the new kernel and the new /sbin/ifconfig prior
to rebooting.
20250820:
The WITHOUT_GSSAPI src.conf knob has been removed. This was already
a no-op for MIT Kerberos, so this only affects builds which set
+1 -1
View File
@@ -159,7 +159,7 @@ struct ifbreq {
uint32_t ifbr_addrexceeded; /* member if addr violations */
ether_vlanid_t ifbr_pvid; /* member if PVID */
uint16_t ifbr_vlanproto; /* member if VLAN protocol */
uint8_t pad[32];
uint8_t pad[28];
};
/* BRDGGIFFLAGS, BRDGSIFFLAGS */