]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: lldp: update mac address
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 Apr 2021 05:45:54 +0000 (14:45 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 Apr 2021 05:45:54 +0000 (14:45 +0900)
src/network/networkd-link.c

index 6c08203c54ade0395d1eb74822e31c65704b7e35..542c4e36be3325957a363edcfae4d6d89c7a81e7 100644 (file)
@@ -2806,6 +2806,12 @@ static int link_update(Link *link, sd_netlink_message *m) {
                                 return log_link_warning_errno(link, r, "Could not update MAC for NDisc: %m");
                 }
 
+                if (link->lldp) {
+                        r = sd_lldp_set_filter_address(link->lldp, &link->hw_addr.addr.ether);
+                        if (r < 0)
+                                return log_link_warning_errno(link, r, "Could not update MAC address for LLDP: %m");
+                }
+
                 r = ipv4_dad_update_mac(link);
                 if (r < 0)
                         return log_link_warning_errno(link, r, "Could not update MAC address in IPv4 ACD client: %m");