networkd: sd_ndisc reset mac address when MAC address change detected.

When there is a change in mac address we are not currently not changing
the MAC address and resulting  v6 connectivity is gone.

When kernel reports a change in mac address change the MAC of ndisc
client too.

Closes # 7806
This commit is contained in:
Susant Sahani 2018-01-24 14:47:07 +05:30 committed by Lennart Poettering
parent 7b7e6b8df5
commit 420d205867
1 changed files with 6 additions and 0 deletions

View File

@ -3317,6 +3317,12 @@ int link_update(Link *link, sd_netlink_message *m) {
if (r < 0)
return log_link_warning_errno(link, r, "Could not update MAC for Router Advertisement: %m");
}
if (link->ndisc) {
r = sd_ndisc_set_mac(link->ndisc, &link->mac);
if (r < 0)
return log_link_warning_errno(link, r, "Could not update MAC for ndisc: %m");
}
}
}