]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: address - update link operstate when address is updated
authorTom Gundersen <teg@jklm.no>
Mon, 26 Oct 2015 23:06:10 +0000 (00:06 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 30 Oct 2015 11:32:48 +0000 (12:32 +0100)
The operstate may change based on address properties, so make a change of
address trigger an operstate update.

src/network/networkd-address.c

index e550ee5701de348d07e8136e54e2668a289cb51f..0338fe9393389f53ebc5b2ad5ea150aa390400cf 100644 (file)
@@ -318,8 +318,12 @@ int address_update(Address *address, unsigned char flags, unsigned char scope, s
         address->scope = scope;
         address->cinfo = *cinfo;
 
-        if (!ready && address_is_ready(address) && address->link)
-                link_check_ready(address->link);
+        if (address->link) {
+                link_update_operstate(address->link);
+
+                if (!ready && address_is_ready(address))
+                        link_check_ready(address->link);
+        }
 
         return 0;
 }