|
From: Chris B. <buc...@us...> - 2012-11-27 22:23:51
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SFCB - Small Footprint CIM Broker".
The branch, master has been updated
via 80d0385adaadd43a98290729812d1ba695c084f1 (commit)
from 2a27df15c74711e4742972f4010498a7ac5e6e45 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 80d0385adaadd43a98290729812d1ba695c084f1
Author: buccella <buc...@li...>
Date: Tue Nov 27 17:23:15 2012 -0500
[ 3590202 ] Enable IPv6 by default for SFCB 1.4
-----------------------------------------------------------------------
Summary of changes:
diff --git a/NEWS b/NEWS
index 56518a8..5951628 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ New features:
- 3531210 Allow indication delivery timeout tuning
- 3562538 Enable curl debug via env variable
- 3590203 Remove pg_interop checking in SFCB 1.4
+- 3590202 Enable IPv6 by default for SFCB 1.4
Bugs fixed:
- 3495804 Cleanup: httpProcId still defined, wrong define in cimXmlGen
diff --git a/configure.ac b/configure.ac
index 2691ea0..b33adf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,11 @@ AC_ARG_ENABLE(docs,
[Enable generation of API documentation.])])
AC_ARG_ENABLE(ipv6,
- [AC_HELP_STRING([--enable-ipv6],
- [include ipv6 support for SFCB.])])
+ [AC_HELP_STRING([--disable-ipv6],
+ [Disable IPv6 support for SFCB])],
+ [enable_ipv6=$enableval],
+ [enable_ipv6="yes"]
+ )
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--enable-tests(=TESTS)],
diff --git a/httpAdapter.c b/httpAdapter.c
index 2d0c223..9d338f6 100644
--- a/httpAdapter.c
+++ b/httpAdapter.c
@@ -195,10 +195,6 @@ typedef struct _buffer {
} Buffer;
#ifdef HAVE_IPV6
-#define USE_INET6
-#endif
-
-#ifdef USE_INET6
static int fallback_ipv4;
#endif
@@ -1100,7 +1096,7 @@ doHttpRequest(CommHndl conn_fd)
struct sockaddr_storage from;
socklen_t from_len = sizeof(from);
getpeername(conn_fd.socket, (struct sockaddr *)&from, &from_len);
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
char ipstr[INET6_ADDRSTRLEN] = {0};
#else
char ipstr[INET_ADDRSTRLEN] = {0};
@@ -1661,7 +1657,7 @@ getSocket()
int fd;
int ru = 1;
-#ifdef USE_INET6 // need to check
+#ifdef HAVE_IPV6 // need to check
fd = socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP);
if (fd < 0) {
mlogf(M_INFO, M_SHOW, "--- Using IPv4 address\n");
@@ -1670,14 +1666,14 @@ getSocket()
}
#else
fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
-#endif // USE_INET6
+#endif // HAVE_IPV6
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &ru, sizeof(ru));
if (bindSocketToDevice(fd) == -1) return -1;
return fd;
}
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
static struct sockaddr *
prepSockAddr6(int port, void *ssin, socklen_t * sin_len)
{
@@ -1729,7 +1725,7 @@ bindToPort(int sock, int port, void *ssin, socklen_t * sin_len)
if (getControlBool("httpLocalOnly", &httpLocalOnly))
httpLocalOnly = 0;
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
if (!fallback_ipv4)
sin = prepSockAddr6(port, ssin, sin_len);
else
@@ -1796,7 +1792,7 @@ static void
acceptRequest(int sock, void *ssin, socklen_t sin_len, int sslMode)
{
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
struct sockaddr_in6 *sin = ssin;
#else
struct sockaddr_in *sin = ssin;
@@ -1892,7 +1888,7 @@ int
httpDaemon(int argc, char *argv[], int sslMode)
{
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
struct sockaddr_in6 httpSin;
#else
struct sockaddr_in httpSin;
@@ -1909,7 +1905,7 @@ httpDaemon(int argc, char *argv[], int sslMode)
int maxfdp1; /* highest-numbered fd +1 */
#ifdef USE_SSL
-#ifdef USE_INET6
+#ifdef HAVE_IPV6
struct sockaddr_in6 httpsSin;
#else
struct sockaddr_in httpsSin;
hooks/post-receive
--
SFCB - Small Footprint CIM Broker
|