1999-10-17 Ken Raeburn <raeburn@raeburn.org>
* localaddr.c (krb5_os_localaddr): Raise buffer size to 10K.
- Handle INET6 addresses.
+ Handle INET6 addresses. If INET6 support is built in but the
+ socket creation fails, fall back to INET.
1999-09-28 Ken Raeburn <raeburn@mit.edu>
#ifndef USE_AF
#ifdef AF_INET6
-#define USE_AF AF_INET6
+#define USE_AF AF_INET6
+#define USE_AF2 AF_INET
#else
#define USE_AF AF_INET
#endif
memset(buf, 0, sizeof(buf));
ifc.ifc_len = sizeof(buf);
ifc.ifc_buf = buf;
-
+
s = socket (USE_AF, USE_TYPE, USE_PROTO);
+#if defined (USE_AF2) && defined (EPROTONOSUPPORT)
+ if (s < 0 && SOCKET_ERRNO == EPROTONOSUPPORT)
+ s = socket (USE_AF2, USE_TYPE, USE_PROTO);
+#endif
if (s < 0)
return SOCKET_ERRNO;