Slirp: Get Windows ipv6 working
In tcp_input function, local sockaddr_storage variables lhost
and fhost are used without being cleared to zero; and consequently
tcp connect call fails on windows because there is some random data
in those variables (windows complains with WSAEADDRNOTAVAIL);
This CL calls memset to clear those two variables so that the address
passed to connect does not have random data in it.
bug: https://code.google.com/p/android/issues/detail?id=226769
Change-Id: Id92a76ff40ef05b0866c00d995e439c24406c892
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index c5063a9..e7f9c6b 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -234,6 +234,8 @@
struct sockaddr_in6 *lhost6, *fhost6;
struct ex_list *ex_ptr;
Slirp *slirp;
+ memset(&lhost, 0, sizeof(lhost));
+ memset(&fhost, 0, sizeof(lhost));
DEBUG_CALL("tcp_input");
DEBUG_ARGS((dfd, " m = %p iphlen = %2d inso = %p\n",