[LEDE-DEV] [PATCH mdnsd] Fix IPv6 read
Cristian Morales Vega
cristian at samknows.com
Wed Dec 14 08:49:38 PST 2016
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 <cristian at samknows.com>
---
interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface.c b/interface.c
index 9ca85e1..1fae58e 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);
}
--
2.9.3
More information about the Lede-dev
mailing list