aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-26 21:26:03 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-26 21:26:03 +0000
commit616f6643ef9c6222418a4e75e84691c8ed9507f9 (patch)
tree15c6313bee44be600969763f6d6e8bc86cc3b018 /src
parent61722638ea75ebced8ae4529c137074e538551bf (diff)
downloadtor-616f6643ef9c6222418a4e75e84691c8ed9507f9.tar.gz
tor-616f6643ef9c6222418a4e75e84691c8ed9507f9.zip
get_interface_addr6(), and by extension get_interface_addr(), were pretty borked. Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion.
svn:r17789
Diffstat (limited to 'src')
-rw-r--r--src/common/address.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 2156ed227b..7ae36d4e8b 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1088,7 +1088,7 @@ get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr)
goto err;
}
- memcpy(addr, &my_addr, sizeof(tor_addr_t));
+ tor_addr_from_sockaddr(addr, (struct sockaddr*)&my_addr, NULL);
r=0;
err:
if (sock >= 0)