From: Cristian Morales Vega Date: Wed, 14 Dec 2016 16:49:38 +0000 (+0000) Subject: Fix IPv6 read X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1fa9077d63b7a1083f71ec058c338b4fb8afebe9;p=oweals%2Fmdnsd.git Fix IPv6 read This is a quick fix. It may still not work when the interface has multiple IPs, and this also applies to IPv4. Signed-off-by: Cristian Morales Vega --- diff --git a/interface.c b/interface.c index c8d8972..4dfeace 100644 --- a/interface.c +++ b/interface.c @@ -306,7 +306,7 @@ read_socket6(struct uloop_fd *u, unsigned int events) if (inp->ipi6_ifindex != iface->ifindex) fprintf(stderr, "invalid iface index %d != %d\n", ifindex, iface->ifindex); - else if (!interface_valid_src((void *) &iface->v4_addr, (void *) &iface->v4_netmask, (void *) &from.sin6_addr, 16)) + else if (!interface_valid_src((void *) &iface->v6_addr, (void *) &iface->v6_netmask, (void *) &from.sin6_addr, 16)) dns_handle_packet(iface, (struct sockaddr *) &from, from.sin6_port, buffer, len); }