From 94e65ee0aecf0749e64fb29b4532c614e7be86a8 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 16 Aug 2017 11:55:39 +0200 Subject: [PATCH] ndp: use IPv4 address list when comparing IPv4 addresses Use IPv4 address list in check_addr_updates which fixes possible segfault as IPv6 address list was used by mistake. Signed-off-by: Hans Dedecker --- src/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ndp.c b/src/ndp.c index 8378ebf..33dde87 100644 --- a/src/ndp.c +++ b/src/ndp.c @@ -335,7 +335,7 @@ static void check_addr_updates(struct interface *iface) bool change = len != (ssize_t)iface->addr4_len; for (ssize_t i = 0; !change && i < len; ++i) - if (addr[i].addr.in.s_addr != iface->ia_addr[i].addr.in.s_addr) + if (addr[i].addr.in.s_addr != iface->addr4[i].addr.in.s_addr) change = true; free(iface->addr4); -- 2.30.2