summaryrefslogtreecommitdiff
path: root/src/network/networkd-netdev-bond.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-15 19:07:35 +0200
committerTom Gundersen <teg@jklm.no>2014-07-15 19:07:35 +0200
commit53af3b7564d9c16720aa06b8bdd2aa054f952bff (patch)
tree9c41512a897b8ddf6316370dea657454f40ff47d /src/network/networkd-netdev-bond.c
parentf5de5b00204f041aaec828d336c8afd9e860a5c3 (diff)
networkd: netdev - set mac for bond/bridge devicse
Suggested by poma.
Diffstat (limited to 'src/network/networkd-netdev-bond.c')
-rw-r--r--src/network/networkd-netdev-bond.c10
1 files changed, 10 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,