]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: drop static configs later
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Nov 2024 18:02:54 +0000 (03:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Nov 2024 02:53:24 +0000 (11:53 +0900)
Follow-up for dd6d53a8dc58c5e6e310b09ba7f7a22600a87ba9.

Unnecessary static configs will be anyway dropped later in
link_configure() -> link_drop_unmanaged_config(). Hence, even if we are
reconfiguring an interface cleanly, it is not necessary to drop static
configs here.

src/network/networkd-link.c

index 990203b528b9d3a17a4ab1cf9ddd174dc61e25f1..72765eebd8fdf632a7fd20797fec0648ea49061b 100644 (file)
@@ -1397,13 +1397,6 @@ int link_reconfigure_impl(Link *link, LinkReconfigurationFlag flags) {
         /* Dropping old .network file */
 
         if (FLAGS_SET(flags, LINK_RECONFIGURE_CLEANLY)) {
-                /* Remove all static configurations. Note, dynamic configurations are dropped by
-                 * link_stop_engines(), and foreign configurations will be removed later by
-                 * link_configure() -> link_drop_unmanaged_config(). */
-                r = link_drop_static_config(link);
-                if (r < 0)
-                        return r;
-
                 /* Stop DHCP client and friends, and drop dynamic configurations like DHCP address. */
                 r = link_stop_engines(link, /* may_keep_dhcp = */ false);
                 if (r < 0)