BIND 10 trac2587, updated. 914eb9b64bfcf703c2538cbf20b9c82bfbdfb525 [2587] use sockaddr_storage
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 15 09:30:06 UTC 2013
The branch, trac2587 has been updated
via 914eb9b64bfcf703c2538cbf20b9c82bfbdfb525 (commit)
from 329ab8b7d40b2bd34997da2635cf68e51795cbf3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 914eb9b64bfcf703c2538cbf20b9c82bfbdfb525
Author: Jelte Jansen <jelte at isc.org>
Date: Tue Jan 15 10:29:47 2013 +0100
[2587] use sockaddr_storage
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/tests/auth_srv_unittest.cc | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc
index 171527c..c3b794b 100644
--- a/src/bin/auth/tests/auth_srv_unittest.cc
+++ b/src/bin/auth/tests/auth_srv_unittest.cc
@@ -1720,13 +1720,16 @@ checkAddrPort(const struct sockaddr& actual_sa,
// systems, but it will make getnameinfo() fail on NetBSD 4
// So we make a copy and if the field is available, we set it
const socklen_t sa_len = getSALength(actual_sa);
- struct sockaddr sa;
- memcpy(&sa, &actual_sa, sa_len);
+ struct sockaddr_storage ss;
+ memcpy(&ss, &actual_sa, sa_len);
+
+ struct sockaddr* sa =
+ static_cast<struct sockaddr*>(static_cast<void*>(&ss));
#ifdef HAVE_SA_LEN
- sa.sa_len = sa_len;
+ sa->sa_len = sa_len;
#endif
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
- const int error = getnameinfo(&sa, sa_len, hbuf, sizeof(hbuf),
+ const int error = getnameinfo(sa, sa_len, hbuf, sizeof(hbuf),
sbuf, sizeof(sbuf),
NI_NUMERICHOST | NI_NUMERICSERV);
if (error != 0) {
More information about the bind10-changes
mailing list