]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: propagate error from in_addr_is_null()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Feb 2019 02:46:51 +0000 (11:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Mar 2019 06:55:55 +0000 (15:55 +0900)
src/network/networkd-address.c

index b53461fd903ee828731d8bba579c726ed974e4f0..e057978400d05eee999cf67013d7f1eee8321c1d 100644 (file)
@@ -495,8 +495,9 @@ static int address_acquire(Link *link, Address *original, Address **ret) {
         assert(ret);
 
         /* Something useful was configured? just use it */
-        if (in_addr_is_null(original->family, &original->in_addr) <= 0)
-                return 0;
+        r = in_addr_is_null(original->family, &original->in_addr);
+        if (r <= 0)
+                return r;
 
         /* The address is configured to be 0.0.0.0 or [::] by the user?
          * Then let's acquire something more useful from the pool. */