diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-12-23 08:02:32 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-12-23 08:02:32 +0000 |
commit | a28c83880b11c987608194a75a0eb18130b276d3 (patch) | |
tree | 30b04cb733655f866b0b44eb17e1d5db546d638e | |
parent | f64fbf59c2e26933084c3067fd31d619ee50e0bc (diff) | |
download | fetchmail-a28c83880b11c987608194a75a0eb18130b276d3.tar.gz fetchmail-a28c83880b11c987608194a75a0eb18130b276d3.tar.bz2 fetchmail-a28c83880b11c987608194a75a0eb18130b276d3.zip |
Improvements to IPv6 code.
svn path=/trunk/; revision=2676
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | socket.c | 14 |
3 files changed, 19 insertions, 3 deletions
@@ -10,13 +10,14 @@ a Certifying Authority we recognize?). (The `lines' figures total .c, .h, .l, and .y files under version control.) * Arrange for fetchmail to restart itself quietly when the rc file is touched. +* Improvements to IPv6 code from Jun-ichiro itojun Hagino <itojun@iijlab.net>. fetchmail-5.2.1 (Sun Dec 19 23:08:53 EST 1999), 18330 lines: * Added FAQ item R10 on timeouts during messages. * Fixed indentation problem in fetchmailconf. * Federico Schwindt's patch to fix broken SSL configuration. * Fixes to use fetchmail with IPv6 enabled on glibc without inet6-apps - installed; thanks to Arkadiusz Mi¶kiewicz. + installed; thanks to Arkadiusz Mis'kiewicz. * Interpret IMAP PREAUTH tag correctly (from Joerg Dorchain). * Upgraded to version 0.21 of smbutil.c. FAQ item S2 now documents how to set a domain name. diff --git a/configure.in b/configure.in index f1e32923..72522aca 100644 --- a/configure.in +++ b/configure.in @@ -290,13 +290,16 @@ AC_ARG_ENABLE(inet6, [ AC_CHECK_FUNC(getaddrinfo, [with_inet6=yes], [ LDFLAGS="$LDFLAGS -L/usr/inet6/lib"; - AC_CHECK_LIB(inet6, getaddrinfo, [with_inet6=yes], + AC_CHECK_LIB(inet6, getaddrinfo, [with_inet6=yes + LIBS="$LIBS -linet6"], [ echo 'configure: cannot find proper glibc version or libinet6,'; echo ' which is required for IPv6 support.'; exit 1]) ] )], [with_inet6=no]) test "$with_inet6" = "yes" && AC_DEFINE(INET6_ENABLE) +AC_CHECK_FUNCS(inner_connect) + AC_ARG_ENABLE(netsec, [ --enable-netsec support network security (requires inet6-apps library)], [ unset ac_cv_lib_inet6_net_security_strtorequest; AC_CHECK_LIB(inet6, net_security_strtorequest,, @@ -127,7 +127,6 @@ int SockOpen(const char *host, const char *service, const char *options, void *request = NULL; int requestlen; #endif /* NET_SECURITY */ - int i; #ifdef HAVE_SOCKETPAIR if (plugin) @@ -154,7 +153,20 @@ int SockOpen(const char *host, const char *service, const char *options, ret: #else /* NET_SECURITY */ +#ifdef HAVE_INNER_CONNECT i = inner_connect(ai, NULL, 0, NULL, NULL, "fetchmail", NULL); +#else + i = socket(ai->ai_family, ai->ai_socktype, 0); + if (i < 0) { + freeaddrinfo(ai); + return -1; + } + if (connect(i, (struct sockaddr *) ai->ai_addr, ai->ai_addrlen) < 0) { + freeaddrinfo(ai); + close(i); + return -1; + } +#endif #endif /* NET_SECURITY */ freeaddrinfo(ai); |