]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: sd_ndisc reset mac address when MAC address change detected.
authorSusant Sahani <susant@redhat.com>
Wed, 24 Jan 2018 09:17:07 +0000 (14:47 +0530)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Jan 2018 11:05:38 +0000 (12:05 +0100)
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

src/network/networkd-link.c

index 2bdb5852a25d7e4ceaf2f7dd39fa2092adce0f0a..616f14b9463e2333b5aafc19a4fcf7867b34ee10 100644 (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");
+                        }
                 }
         }