summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-radv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-26 21:54:52 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-26 22:31:15 +0100
commitdc0ec5e25189125c4f3695b2550159d82c24a70d (patch)
treec54f4277126d97b630216e24fdc5593f11f4ae6c /src/libsystemd-network/sd-radv.c
parentsd-radv: drop const from non-ptr argument (diff)
downloadsystemd-dc0ec5e25189125c4f3695b2550159d82c24a70d.tar.xz
systemd-dc0ec5e25189125c4f3695b2550159d82c24a70d.zip
sd-radv: simplify IPv6 address is-null check
Diffstat (limited to '')
-rw-r--r--src/libsystemd-network/sd-radv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c
index e853dc8be6..bedc53e2bd 100644
--- a/src/libsystemd-network/sd-radv.c
+++ b/src/libsystemd-network/sd-radv.c
@@ -145,11 +145,13 @@ static int radv_send(sd_radv *ra, const struct in6_addr *dst, uint32_t router_li
usec_t time_now;
int r;
+ assert(ra);
+
r = sd_event_now(ra->event, clock_boottime_or_monotonic(), &time_now);
if (r < 0)
return r;
- if (dst && !in_addr_is_null(AF_INET6, (union in_addr_union*) dst))
+ if (dst && !IN6_IS_ADDR_UNSPECIFIED(dst))
dst_addr.sin6_addr = *dst;
adv.nd_ra_type = ND_ROUTER_ADVERT;