summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-04-20 19:34:51 +0200
committerTom Gundersen <teg@jklm.no>2014-04-20 19:34:53 +0200
commit4bb40e8125ae0a83a13cb8e020950975eeeb1ad2 (patch)
treec88df4175ba7282ec95a7fdd79cecf9012b0bb27 /src/network/networkd-link.c
parent6317519517210f703e20dc846b31d018845244cd (diff)
networkd: link - set mac addresses when starting clients
MAC addreses are also set when NEWLINK messages are receieved, but only if the clients have already been initialized.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 8c6bad4de3..cf22778b42 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1409,6 +1409,10 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
+ r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
+ if (r < 0)
+ return r;
+
r = sd_ipv4ll_set_index(link->ipv4ll, link->ifindex);
if (r < 0)
return r;
@@ -1427,6 +1431,10 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
+ r = sd_dhcp_client_set_mac(link->dhcp_client, &link->mac);
+ if (r < 0)
+ return r;
+
r = sd_dhcp_client_set_index(link->dhcp_client, link->ifindex);
if (r < 0)
return r;