From: Yu Watanabe Date: Mon, 3 Oct 2022 14:57:48 +0000 (+0900) Subject: network: ndisc: address_get() returns 0 on success X-Git-Tag: v252-rc1~16^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d1babc51d9f40da28bc08c9d0ff401bd00b8e1f;p=thirdparty%2Fsystemd.git network: ndisc: address_get() returns 0 on success After the commit 3b6a3bdebfb555754fdc6ee507e3f6964de7b61c, address_get() does not return 1. --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index e992ebd1a9f..5b772adc033 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -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)