summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-07-03 12:48:53 -0400
committerGreg Hudson <ghudson@mit.edu>2014-07-04 15:14:03 -0400
commit48a0b16ab1f70b6486a6d7af7ca9e7b376b19956 (patch)
treef761ac8f8209fca8708f9f55f8fc5c7b13ce8940 /src/util
parent1fde9a67030845d3cae0661595f5737a4db8b9dd (diff)
downloadkrb5-48a0b16ab1f70b6486a6d7af7ca9e7b376b19956.tar.gz
krb5-48a0b16ab1f70b6486a6d7af7ca9e7b376b19956.tar.xz
krb5-48a0b16ab1f70b6486a6d7af7ca9e7b376b19956.zip
Avoid using length fields in socket addresses
Remove code to set or reference the length fields of socket addresses (sa_len/sin_len/sin6_len), since they aren't portable and setting them is not required. Remove autoconf tests for those fields which are no longer used or which were never used. There is one exception: in localaddr.c, we still neeed to reference sa_len for the definition of ifreq_size on platforms which have sa_len. Leave that behind, along with the autoconf test which defines SA_LEN.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/support/fake-addrinfo.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/util/support/fake-addrinfo.c b/src/util/support/fake-addrinfo.c
index 6ddf8593f..4824a6185 100644
--- a/src/util/support/fake-addrinfo.c
+++ b/src/util/support/fake-addrinfo.c
@@ -566,9 +566,6 @@ static inline int fai_add_entry (struct addrinfo **result, void *addr,
sin4->sin_family = AF_INET;
sin4->sin_addr = *(struct in_addr *)addr;
sin4->sin_port = port;
-#ifdef HAVE_SA_LEN
- sin4->sin_len = sizeof (struct sockaddr_in);
-#endif
}
if (template->ai_family == AF_INET6) {
struct sockaddr_in6 *sin6;
@@ -580,9 +577,6 @@ static inline int fai_add_entry (struct addrinfo **result, void *addr,
sin6->sin6_family = AF_INET6;
sin6->sin6_addr = *(struct in6_addr *)addr;
sin6->sin6_port = port;
-#ifdef HAVE_SA_LEN
- sin6->sin6_len = sizeof (struct sockaddr_in6);
-#endif
}
n->ai_next = *result;
*result = n;
@@ -1294,9 +1288,6 @@ getaddrinfo (const char *name, const char *serv, const struct addrinfo *hint,
just leftover from previous contents of the memory
block?). So, always override what libc returned. */
ai->ai_addr->sa_family = ai->ai_family;
-#ifdef HAVE_SA_LEN /* always true on AIX, actually */
- ai->ai_addr->sa_len = ai->ai_addrlen;
-#endif
}
#endif