summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-netdev-bond.c10
-rw-r--r--src/network/networkd-netdev-bridge.c10
2 files changed, 20 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index 89e3965d16..55cef0d8db 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -76,6 +76,16 @@ static int netdev_bond_fill_message_create(NetDev *netdev, sd_rtnl_message *m) {
return r;
}
+ if (netdev->mac) {
+ r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
+ if (r < 0) {
+ log_error_netdev(netdev,
+ "Colud not append IFLA_ADDRESS attribute: %s",
+ strerror(-r));
+ return r;
+ }
+ }
+
r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
if (r < 0) {
log_error_netdev(netdev,
diff --git a/src/network/networkd-netdev-bridge.c b/src/network/networkd-netdev-bridge.c
index 9a8bf57ee6..dc43129403 100644
--- a/src/network/networkd-netdev-bridge.c
+++ b/src/network/networkd-netdev-bridge.c
@@ -43,6 +43,16 @@ static int netdev_bridge_fill_message_create(NetDev *netdev, sd_rtnl_message *m)
return r;
}
+ if (netdev->mac) {
+ r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, netdev->mac);
+ if (r < 0) {
+ log_error_netdev(netdev,
+ "Colud not append IFLA_ADDRESS attribute: %s",
+ strerror(-r));
+ return r;
+ }
+ }
+
r = sd_rtnl_message_open_container(m, IFLA_LINKINFO);
if (r < 0) {
log_error_netdev(netdev,