#define IPV6_MIN_MTU 1280
#endif /* IPV6_MIN_MTU */
-#ifdef AF_INET6
-#define INET6
-#else
-#define AF_INET6 28
-#endif
+#ifndef CHECKED_INET6
+# define CHECKED_INET6
+# ifdef AF_INET6
+# define INET6
+# else
+# define AF_INET6 28
+# endif
+#endif /* CHECKED_INET6 */
#ifndef HAVE_SNPRINTF
#include <stdarg.h>
- added util/mini-event.c and .h, a select based alternative used with
./configure --with-libevent=no
It is limited to 1024 file descriptors, and has less features.
+ - will not create ip6 sockets if ip6 not on the machine.
15 February 2007: Wouter
- port to FreeBSD 4.11 Dec Alpha. Also works on Solaris 10 sparc64,
return NULL;
}
outnet->base = base;
+#ifndef INET6
+ do_ip6 = 0;
+#endif
calc_num46(ifs, num_ifs, do_ip4, do_ip6, num_ports,
&outnet->num_udp4, &outnet->num_udp6);
/* adds +1 to portnums so we do not allocate zero bytes. */
outnet->num_udp4 = make_udp_range(outnet->udp4_ports,
NULL, num_ports, 1, 0, port_base, outnet);
}
- if(outnet->num_udp4 != num_ports ||
- outnet->num_udp6 != num_ports) {
+ if( (do_ip4 && outnet->num_udp4 != num_ports) ||
+ (do_ip6 && outnet->num_udp6 != num_ports)) {
log_err("Could not open all networkside ports");
outside_network_delete(outnet);
return NULL;