diff -Nru systemd-237/debian/changelog systemd-237/debian/changelog --- systemd-237/debian/changelog 2021-03-17 21:38:05.000000000 +0000 +++ systemd-237/debian/changelog 2021-04-07 06:11:17.000000000 +0000 @@ -1,3 +1,10 @@ +systemd (237-3ubuntu10.47) bionic; urgency=medium + + * d/p/network_always_drop_configs_when_interface_is_renamed.patch: + Fix networkd renaming race condition (LP: #1923115) + + -- Seyeong Kim Wed, 07 Apr 2021 15:11:17 +0900 + systemd (237-3ubuntu10.46) bionic; urgency=medium * d/p/lp1916485-Newer-Glibc-use-faccessat2-to-implement-faccessat.patch: diff -Nru systemd-237/debian/patches/lp1923115-network-always-drop-configs-when-interface-is-renamed.patch systemd-237/debian/patches/lp1923115-network-always-drop-configs-when-interface-is-renamed.patch --- systemd-237/debian/patches/lp1923115-network-always-drop-configs-when-interface-is-renamed.patch 1970-01-01 00:00:00.000000000 +0000 +++ systemd-237/debian/patches/lp1923115-network-always-drop-configs-when-interface-is-renamed.patch 2021-04-07 06:11:17.000000000 +0000 @@ -0,0 +1,35 @@ +Description: network: always drop configs when interface is renamed + Before the renaming, wrong .network file may be assigned to the link. + So, let's always drop link configuration. +Author: Yu Watanabe +Origin: https://github.com/systemd/systemd/commit/30de2b89d125a8692c22579ef805b03f2054b30b +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1923115 +--- +Index: systemd-237/src/network/networkd-link.c +=================================================================== +--- systemd-237.orig/src/network/networkd-link.c ++++ systemd-237/src/network/networkd-link.c +@@ -3490,17 +3490,14 @@ int link_update(Link *link, sd_netlink_m + + r = sd_netlink_message_read_string(m, IFLA_IFNAME, &ifname); + if (r >= 0 && !streq(ifname, link->ifname)) { +- log_link_info(link, "Interface name change detected, %s has been renamed to %s.", link->ifname, ifname); +- +- link_free_carrier_maps(link); ++ Manager *manager = link->manager; + +- r = free_and_strdup(&link->ifname, ifname); +- if (r < 0) +- return r; ++ log_link_info(link, "Interface name change detected, %s has been renamed to %s.", link->ifname, ifname); + +- r = link_new_carrier_maps(link); +- if (r < 0) +- return r; ++ link_drop(link); ++ r = link_add(manager, m, &link); ++ if (r < 0) ++ return r; + } + + r = sd_netlink_message_read_u32(m, IFLA_MTU, &mtu); diff -Nru systemd-237/debian/patches/series systemd-237/debian/patches/series --- systemd-237/debian/patches/series 2021-03-17 21:37:51.000000000 +0000 +++ systemd-237/debian/patches/series 2021-04-07 06:11:17.000000000 +0000 @@ -248,3 +248,4 @@ lp1916485-Newer-Glibc-use-faccessat2-to-implement-faccessat.patch lp1918696-shared-seccomp-util-address-family-filtering-is-brok.patch lp1891810-seccomp-util-add-new-syscalls-from-kernel-5.6-to-sys.patch +lp1923115-network-always-drop-configs-when-interface-is-renamed.patch