]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/netdev: generate persistent MAC address for batadv and bridge 21549/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 Nov 2021 02:36:09 +0000 (11:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 28 Nov 2021 03:04:55 +0000 (12:04 +0900)
This mostly reverts 489f01f806f865eabb55458c98182b06a6c53a62 and
deb2cfa4c6885d448eb1f17e5ef1b139106b7e86.

As now MACAddress=none is supported. So, users can still disable MAC
address assignment.

man/systemd.netdev.xml
src/network/netdev/batadv.c
src/network/netdev/bridge.c

index 133c6fcc637261658c6c459e1b5afbb8a5a77195..bd493a8c53fc06774c3a296ba5ec421e856332c4 100644 (file)
           devices, the <varname>MACAddress=</varname> setting in the [NetDev] section is not
           supported and will be ignored. Please specify it in the [Link] section of the corresponding
           <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-          file. If this option is not set, <literal>bridge</literal> and <literal>vlan</literal> devices
-          inherit the MAC address of the first slave device or the physical interface, respectively. For other
-          kind of netdevs, if this option is not set, then the MAC address is generated based on the interface
-          name and the
+          file. If this option is not set, <literal>vlan</literal> device inherits the MAC address of
+          the master interface. For other kind of netdevs, if this option is not set, then the MAC
+          address is generated based on the interface name and the
           <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
           </para>
           <para>Note, even if <literal>none</literal> is specified, <command>systemd-udevd</command>
index f42f572a36774c50bb107e18894b9de5aea0e40b..15f3aee3a63d2db0146ceea9a3ec80df1e29e35f 100644 (file)
@@ -203,4 +203,5 @@ const NetDevVTable batadv_vtable = {
         .post_create = netdev_batadv_post_create,
         .create_type = NETDEV_CREATE_MASTER,
         .iftype = ARPHRD_ETHER,
+        .generate_mac = true,
 };
index 2d60e441ec3e30386d5af42b41661b75c0449f44..64d65493cafd9457d5a44e7adad612b5f025fb34 100644 (file)
@@ -278,4 +278,5 @@ const NetDevVTable bridge_vtable = {
         .post_create = netdev_bridge_post_create,
         .create_type = NETDEV_CREATE_MASTER,
         .iftype = ARPHRD_ETHER,
+        .generate_mac = true,
 };