summaryrefslogtreecommitdiff
path: root/src/lib/net
diff options
context:
space:
mode:
authorKris Katterjohn <katterjohn@gmail.com>2019-01-07 17:28:21 -0600
committerKris Katterjohn <katterjohn@gmail.com>2019-01-07 17:28:21 -0600
commitc59b572e934ec501cf7db78d10e36a6cf984b97b (patch)
treeaddc8f96f980ccfc4255a520cdf55e76f5cbe8cd /src/lib/net
parent52b508735f4e3a58e6d9c808f7815bba66f5190e (diff)
downloadtor-c59b572e934ec501cf7db78d10e36a6cf984b97b.tar.gz
tor-c59b572e934ec501cf7db78d10e36a6cf984b97b.zip
Fix tor_ersatz_socketpair on IPv6-only systems
In get_local_listener used by tor_ersatz_socketpair, the address family used when binding the IPv6 socket was AF_INET instead of AF_INET6. Fixes bug 28995; bugfix on 0.3.5.1-alpha. Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Diffstat (limited to 'src/lib/net')
-rw-r--r--src/lib/net/socketpair.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/net/socketpair.c b/src/lib/net/socketpair.c
index 380338f15c..6a21581d87 100644
--- a/src/lib/net/socketpair.c
+++ b/src/lib/net/socketpair.c
@@ -62,7 +62,7 @@ get_local_listener(int family, int type)
len = sizeof(sin);
} else {
sa = (struct sockaddr *) &sin6;
- sin6.sin6_family = AF_INET;
+ sin6.sin6_family = AF_INET6;
sin6.sin6_addr.s6_addr[15] = 1;
len = sizeof(sin6);
}