chiark / gitweb /
networkd: link - fix carrier check on new link
authorTom Gundersen <teg@jklm.no>
Tue, 17 Jun 2014 06:54:44 +0000 (08:54 +0200)
committerTom Gundersen <teg@jklm.no>
Tue, 17 Jun 2014 07:17:07 +0000 (09:17 +0200)
We were comparing against our own internal enum rather than the kernel exposed one.

Found by Thomas Ritter.

src/network/networkd-link.c

index 7c738fe..d81a3bf 100644 (file)
@@ -1764,7 +1764,7 @@ static int link_configure(Link *link) {
                 */
         }
 
-        if (link_has_carrier(link->flags, link->operstate)) {
+        if (link_has_carrier(link->flags, link->kernel_operstate)) {
                 r = link_acquire_conf(link);
                 if (r < 0)
                         return r;