]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/network/networkd-address.c
network: rename link_drop_managed_xyz() -> link_drop_static_xyz()
[thirdparty/systemd.git] / src / network / networkd-address.c
index 2aa8c88bb2d763e5bccbc8d2095229c465baaa83..e301cf153d6ad474386b8ff54eda42d12ce6e11c 100644 (file)
@@ -1383,15 +1383,16 @@ int link_drop_foreign_addresses(Link *link) {
         return r;
 }
 
-int link_drop_managed_addresses(Link *link) {
+int link_drop_static_addresses(Link *link) {
         Address *address;
         int r = 0;
 
         assert(link);
 
         SET_FOREACH(address, link->addresses) {
-                /* Do not touch addresses managed by kernel or other tools. */
-                if (address->source == NETWORK_CONFIG_SOURCE_FOREIGN)
+                /* Remove only static addresses here. Dynamic addresses will be removed e.g. on lease
+                 * expiration or stopping the DHCP client. */
+                if (address->source != NETWORK_CONFIG_SOURCE_STATIC)
                         continue;
 
                 /* Ignore addresses not assigned yet or already removing. */