chiark / gitweb /
networkd: link - serialize link when addresses change
authorTom Gundersen <teg@jklm.no>
Wed, 21 May 2014 09:28:13 +0000 (11:28 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 21 May 2014 09:32:03 +0000 (11:32 +0200)
Thanks to Kay for tracking this down.

src/network/networkd-link.c

index 04a2f8c..6677b94 100644 (file)
@@ -1809,12 +1809,17 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use
                 LIST_PREPEND(addresses, link->addresses, address);
                 address = NULL;
 
+                link_save(link);
+
                 break;
         case RTM_DELADDR:
-                if (address_dropped)
+                if (address_dropped) {
                         log_debug_link(link, "removed address: %s/%u", buf,
                                       address->prefixlen);
 
+                        link_save(link);
+                }
+
                 break;
         default:
                 assert_not_reached("Received invalid RTNL message type");