#1002656 bridge-utils: bridge_hw: add random option like for ifupdown hwaddress

Package:
bridge-utils
Source:
bridge-utils
Description:
Utilities for configuring the Linux Ethernet bridge
Submitter:
Martin-Éric Racine
Date:
2026-01-10 11:39:15 UTC
Severity:
normal
#1002656#5
Date:
2021-12-26 19:56:29 UTC
From:
To:
It would be desirable for bridge_hw to be able to generate a random MAC address as per ifupdown's generic hwaddress syntax.

Possible values for bridge_hw would thereafter be:

MAC
interface
random

MAC|interface would continue working as currently, while random would generate a random MAC address for the bridge.

- -- System Information:
Debian Release: 11.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-10-amd64 (SMP w/8 CPU threads)
Locale: LANG=fi_FI.utf8, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8), LANGUAGE=fi:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bridge-utils depends on:
ii  libc6  2.31-13+deb11u2

bridge-utils recommends no packages.

Versions of packages bridge-utils suggests:
ii  ifupdown  0.8.36

- -- Configuration Files:
/etc/default/bridge-utils changed:
BRIDGE_HOTPLUG=yes


- -- no debconf information
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEyJACx3qL7GpObXOQrh+Cd8S017YFAmHIyO0ACgkQrh+Cd8S0
17Yraw/+ORSlJr3mNO42CukYENJpgIQ+DPGgHNsaJJvzYZIqFR+3NS9hJXQpoEJ/
TmFd10iLwzIshvpyc+Bs7LqceXw+PDYR3wW+rPJy567seD7H9ddf9H0XNdY5diFR
NO4z4IK+NDyfs/Bjy1cn4SuOC5YO8exRnZLZgrDQ/uGNalk6haOmoZag3J637b9y
y7Dw7edhvxo5wQw036mx5cc+46gtMOgaphH4jOmfy9lp3UMxsNMRJCSlzcZIbYy/
0K62PVhHaFDbmk/kSKDenmtVySklPhbow3uQtHuybYTNjGlXOwImA2LTHDPcEECi
ZfdOM3n2h80iwlk2qLFrySDMbSGQDQwR6YMsjPY4Yd6oSGSovlkPgrd4YZ2o6xvf
I91CsdICodkbydQjzJkrvhjnI1W/LqXj49+eeSz5fYqE7TbVqp6KD6uoiclW2yI+
qVUdzP7jJVqUeE3StzvL09sXqiw/JrjXyl1y412hCRoVGJQl2Lgj7vvKYcItRZs7
cMWk8P+KYHhyxXkrddjdGJvVylMquu7H1b6AHNVjniu+ui88vvb1zpLudzvpHwh2
wpdAd4M/a+4/j8/jVl3wydp8rvHmrc9MkB84MsXTB+uaJP86GSJeo24XOas1uN5m
yjIkl8Vexjh1+QQaWcP14T2upnM7uY1Sj/5AyFrjk8SJIL5+mlM=
=P6wb
-----END PGP SIGNATURE-----

#1002656#10
Date:
2022-10-06 22:01:17 UTC
From:
To:
Hi!

I don't know if I get this right or not... if you don't want to specify a
MAC or get it from an interface... then you better not assign any MAC and so
systemd will do his thing and assign a "random" one.

I really don't think that the code on bridge-utils should generate such a
random MAC, systemd already causes a lot of trouble by overriding the
address that the kernel would select, I don't think we need another actor
here.

Can you justify your request?

Otherwise I'll close the bug.

Regards.

#1002656#15
Date:
2022-10-06 22:01:17 UTC
From:
To:
Hi!

I don't know if I get this right or not... if you don't want to specify a
MAC or get it from an interface... then you better not assign any MAC and so
systemd will do his thing and assign a "random" one.

I really don't think that the code on bridge-utils should generate such a
random MAC, systemd already causes a lot of trouble by overriding the
address that the kernel would select, I don't think we need another actor
here.

Can you justify your request?

Otherwise I'll close the bug.

Regards.

#1002656#20
Date:
2022-10-07 04:41:34 UTC
From:
To:
The kernel using the MAC of a real device, if none is specified, is
precisely what we wanna avoid.  Systemd is not involed.

Martin-Éric

#1002656#25
Date:
2022-10-07 20:34:17 UTC
From:
To:
Like I said, if we don't specify the mac address systemd will set up a fake
one for us, so... systemd is involved and the kernel is not allowed to use a
real one, that's why I said that bridge-utils shouldn't do a thing about
this.

Regards.

#1002656#30
Date:
2023-06-10 03:04:28 UTC
From:
To:
No, systemd does not set up a fake MAC address. Rather, the MAC
address of any PHY attached to the bridge is used if no MAC address is
specified.

Martin-Éric

#1002656#35
Date:
2023-06-11 06:23:47 UTC
From:
To:
On Sat, Jun 10, 2023 at 6:04 AM Martin-Éric Racine <martin-eric.racine@iki.fi> wrote:

Btw, I vaguely recall you having had to modify the code to stop
showing the IPv6 local-link of wireless devices. Is that correct? If
yes, simply reverting this to have all devices show IPv6 local-link
would be a suitable fix. It would of course introduce a shift in
expected behavior from Bulleseye, but it would at least act
consistently for all interfaces.

Martin-Éric

#1002656#40
Date:
2026-01-10 10:08:08 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.