]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: ndisc: address_get() returns 0 on success
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Oct 2022 14:57:48 +0000 (23:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Oct 2022 15:25:14 +0000 (00:25 +0900)
After the commit 3b6a3bdebfb555754fdc6ee507e3f6964de7b61c, address_get()
does not return 1.

src/network/networkd-ndisc.c

index e992ebd1a9f407ccdbe8a8829914c47a4401c925..5b772adc0331683144a6a86e570fb74b6941f7f5 100644 (file)
@@ -389,7 +389,7 @@ static int ndisc_router_process_autonomous_prefix(Link *link, sd_ndisc_router *r
                  * honoring all valid lifetimes to improve the reaction of SLAAC to renumbering events.
                  * See draft-ietf-6man-slaac-renum-02, section 4.2. */
                 r = address_get(link, address, &e);
-                if (r > 0) {
+                if (r >= 0) {
                         /* If the address is already assigned, but not valid anymore, then refuse to
                          * update the address, and it will be removed. */
                         if (e->lifetime_valid_usec < timestamp_usec)