From: Yu Watanabe Date: Tue, 24 Nov 2020 06:47:13 +0000 (+0900) Subject: network: stop to assign UUID when reconfiguring link X-Git-Tag: v248-rc1~607^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17707%2Fhead;p=thirdparty%2Fsystemd.git network: stop to assign UUID when reconfiguring link This fixes the following race in reconfiguring link: 1. an interface requests UUID. 2. the interface is reconfigured and link_configure() is called. 3. sd-lldp client is started on the interface (it is enabled by default). 4. networkd acquires UUID, and get_product_uuid_handler() calls link_configure() for the link again. 5. link_lldp_rx_configure() fails to set ifindex for already running sd-lldp client. 6. the link enters failed state. --- diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 2b7055dd0fa..547f3bbc012 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2172,6 +2172,7 @@ static int link_reconfigure_internal(Link *link, sd_netlink_message *m, bool for link_free_carrier_maps(link); link_free_engines(link); link->network = network_unref(link->network); + link_unref(set_remove(link->manager->links_requesting_uuid, link)); /* Then, apply new .network file */ r = network_apply(network, link);