mirror of
https://github.com/systemd/systemd.git
synced 2025-02-01 09:47:35 +03:00
networkd: link - intialize mac address
Otherwise .netwrok matching on MAC address will not work. Based on patch by Dave Reisner, and bug originally reported by Max Pray.
This commit is contained in:
parent
f598ac3e28
commit
512922f8b4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user