From: Hans Dedecker Date: Wed, 16 Aug 2017 09:55:39 +0000 (+0200) Subject: ndp: use IPv4 address list when comparing IPv4 addresses X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=94e65ee0aecf0749e64fb29b4532c614e7be86a8;p=project%2Fodhcpd.git 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 --- 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);