+2004-04-02 Ken Raeburn <raeburn@mit.edu>
+
+ * network.c (setup_a_tcp_listener): Try to turn the IPV6_V6ONLY
+ socket option on, not off, and do it before calling bind.
+ (setup_tcp_listener_ports): Don't do it here any more.
+ (setup_udp_port): Ignore AF_DLI addresses.
+
2004-03-22 Ken Raeburn <raeburn@mit.edu>
* network.c (delete_fd): Free pointed-to data after removing it
if (setreuseaddr(sock, 1) < 0)
com_err(data->prog, errno,
"Cannot enable SO_REUSEADDR on fd %d", sock);
+#ifdef KRB5_USE_INET6
+ if (addr->sa_family == AF_INET6) {
+#ifdef IPV6_V6ONLY
+ if (setv6only(sock, 1))
+ com_err(data->prog, errno, "setsockopt(IPV6_V6ONLY,1) failed");
+ else
+ com_err(data->prog, 0, "setsockopt(IPV6_V6ONLY,1) worked");
+#else
+ krb5_klog_syslog(LOG_INFO, "no IPV6_V6ONLY socket option support");
+#endif /* IPV6_V6ONLY */
+ }
+#endif /* KRB5_USE_INET6 */
if (bind(sock, addr, socklen(addr)) == -1) {
com_err(data->prog, errno,
"Cannot bind TCP server socket on %s", paddr(addr));
s6 = setup_a_tcp_listener(data, (struct sockaddr *)&sin6);
if (s6 < 0)
return -1;
-#ifdef IPV6_V6ONLY
- if (setv6only(s6, 0))
- com_err(data->prog, errno, "setsockopt(IPV6_V6ONLY,0) failed");
- else
- com_err(data->prog, 0, "setsockopt(IPV6_V6ONLY,0) worked");
-#else
- krb5_klog_syslog(LOG_INFO, "no IPV6_V6ONLY socket option support");
-#endif
s4 = setup_a_tcp_listener(data, (struct sockaddr *)&sin4);
#endif /* KRB5_USE_INET6 */
#ifdef AF_LINK /* some BSD systems, AIX */
case AF_LINK:
return 0;
+#endif
+#ifdef AF_DLI /* Direct Link Interface - DEC Ultrix/OSF1 link layer? */
+ case AF_DLI:
+ return 0;
#endif
default:
krb5_klog_syslog (LOG_INFO,