chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f598ac3
)
networkd: link - intialize mac address
author
Tom Gundersen
<teg@jklm.no>
Wed, 4 Jun 2014 19:29:08 +0000
(21:29 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 4 Jun 2014 19:29:25 +0000
(21:29 +0200)
Otherwise .netwrok matching on MAC address will not work.
Based on patch by Dave Reisner, and bug originally reported by Max Pray.
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index 6e6fb8393e97ffca32d5b67418439e678c8c7bcd..36534268916c0b0370ce34cbfd5501e83e2bf2d0 100644
(file)
--- a/
src/network/networkd-link.c
+++ b/
src/network/networkd-link.c
@@
-75,6
+75,10
@@
static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) {
if (!link->ifname)
return -ENOMEM;
+ r = sd_rtnl_message_read_ether_addr(message, IFLA_ADDRESS, &link->mac);
+ if (r < 0)
+ return r;
+
r = asprintf(&link->state_file, "/run/systemd/netif/links/%"PRIu64,
link->ifindex);
if (r < 0)