summaryrefslogtreecommitdiff
path: root/slirp/socket.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-03-20 15:09:09 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-07-03 23:27:08 +0200
commit1d17654e762ed1e31bfb16915fd03499c03d2063 (patch)
treec39ce52e46973ad34720b2e7fb181e489c17614b /slirp/socket.c
parent972487b878dbdbdc9402208aace41c9573aa6c8b (diff)
downloadqemu-1d17654e762ed1e31bfb16915fd03499c03d2063.tar.gz
qemu-1d17654e762ed1e31bfb16915fd03499c03d2063.tar.bz2
qemu-1d17654e762ed1e31bfb16915fd03499c03d2063.zip
slirp: Add dns6 resolution
This makes get_dns_addr address family-agnostic, thus allowing to add the IPv6 case. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'slirp/socket.c')
-rw-r--r--slirp/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index b336586c7b..8e8de88044 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -816,9 +816,9 @@ void sotranslate_out(struct socket *so, struct sockaddr_storage *addr)
if (in6_equal_net(&so->so_faddr6, &slirp->vprefix_addr6,
slirp->vprefix_len)) {
if (in6_equal(&so->so_faddr6, &slirp->vnameserver_addr6)) {
- /*if (get_dns_addr(&addr) < 0) {*/ /* TODO */
+ if (get_dns6_addr(&sin6->sin6_addr) < 0) {
sin6->sin6_addr = in6addr_loopback;
- /*}*/
+ }
} else {
sin6->sin6_addr = in6addr_loopback;
}