[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Sat Apr 24 12:34:37 MDT 2010
The branch, master has been updated
via b29f3f4... Revert "tsocket: not all systems have IPV6_V6ONLY"
via 26e6fb0... lib/replace/wscript: make sure IPV6_V6ONLY is available for IPv6 support
via 41cd6f9... lib/replace: make sure IPV6_V6ONLY is available for IPv6 support
via db29b2d... lib/replace/wscript: add replacement for IPV6_V6ONLY on linux systems with broken headers
via e06cf39... lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers
via 051535f... buildtools/wafsamba: inline defines during configure into the tests
via 1ed5f71... buildtools/wafsamba: make sure we create bin/default/ before trying to create symlinks in it
from c88b83b... s4 dns: Allow to specify static grant entries to be added to the dynamicaly generated named.conf.update
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b29f3f497bdcd4830ffbb615ad0dbc9f5d0af53c
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 19:36:01 2010 +0200
Revert "tsocket: not all systems have IPV6_V6ONLY"
This reverts commit 63fc3978089df403d7e63462593784ff3d05e6e7.
We now don't support IPv6 when IPV6_V6ONLY isn't available,
as we rely on the behavior.
metze
commit 26e6fb0efe461d55e72da637b1b921b77f28af73
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 13:07:50 2010 +0200
lib/replace/wscript: make sure IPV6_V6ONLY is available for IPv6 support
We really on IPV6_V6ONLY being supported.
metze
commit 41cd6f992829c45c890f5daf78eb3019633f3620
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 13:07:50 2010 +0200
lib/replace: make sure IPV6_V6ONLY is available for IPv6 support
We really on IPV6_V6ONLY being supported.
metze
commit db29b2d6d2dfdebb91292b0640642c545fbce025
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 19:28:48 2010 +0200
lib/replace/wscript: add replacement for IPV6_V6ONLY on linux systems with broken headers
This is needed on SLES8.
metze
commit e06cf3950252a46486aa046a4552ed6ebff175b3
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 19:02:22 2010 +0200
lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers
This is needed on SLES8.
metze
commit 051535f196305f5ded4d786a2db977b0626ee0b9
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 18:10:37 2010 +0200
buildtools/wafsamba: inline defines during configure into the tests
There 2 reasons for this change:
- This is how autoconf tests work and it makes config.log much more useful
- The waf c preprocessor ignored changes in bin/default/__confdefs.h when using
waf configure -C, because is outside of the configure tests project path
and handled like a system header.
Many thanks to ita for pointing out the fix.
metze
commit 1ed5f7182074768a84eefc00bd2af64933799b4d
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Apr 24 20:02:44 2010 +0200
buildtools/wafsamba: make sure we create bin/default/ before trying to create symlinks in it
metze
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 11 ++----
buildtools/wafsamba/wafsamba.py | 1 +
lib/replace/libreplace_network.m4 | 52 +++++++++++++++++++++++++++++++++
lib/replace/system/network.h | 7 ++++
lib/replace/wscript | 27 +++++++++++++++++
lib/tsocket/tsocket_bsd.c | 4 +-
6 files changed, 93 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index c35db9b..743f420 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -345,19 +345,16 @@ def CHECK_CODE(conf, code, define,
else:
execute = 0
+ defs = conf.get_config_header()
+
if addmain:
- fragment='#include "__confdefs.h"\n%s\n int main(void) { %s; return 0; }\n' % (hdrs, code)
+ fragment='%s\n%s\n int main(void) { %s; return 0; }\n' % (defs, hdrs, code)
else:
- fragment='#include "__confdefs.h"\n%s\n%s\n' % (hdrs, code)
-
- conf.write_config_header('__confdefs.h', top=True)
+ fragment='%s\n%s\n%s\n' % (defs, hdrs, code)
if msg is None:
msg="Checking for %s" % define
- # include the directory containing __confdefs.h
- cflags += ' -I../../default'
-
if local_include:
cflags += ' -I%s' % conf.curdir
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 0f6a4fe..95410aa 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -57,6 +57,7 @@ def SAMBA_BUILD_ENV(conf):
mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc'))
# this allows all of the bin/shared and bin/python targets
# to be expressed in terms of build directory paths
+ mkdir_p(os.path.join(conf.blddir, 'default'))
for p in ['python','shared']:
link_target = os.path.join(conf.blddir, 'default/' + p)
if not os.path.lexists(link_target):
diff --git a/lib/replace/libreplace_network.m4 b/lib/replace/libreplace_network.m4
index bccd773..cff7034 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -375,6 +375,50 @@ if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
fi
fi
+dnl Some old Linux systems have broken header files and
+dnl miss the IPV6_V6ONLY define in netinet/in.h,
+dnl but have it in linux/in6.h.
+dnl We can't include both files so we just check if the value
+dnl if defined and do the replacement in system/network.h
+AC_CACHE_CHECK([for IPV6_V6ONLY support],libreplace_cv_HAVE_IPV6_V6ONLY,[
+ AC_TRY_COMPILE([
+#include <stdlib.h> /* for NULL */
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <netinet/in.h>
+ ],
+ [
+#ifndef IPV6_V6ONLY
+#error no IPV6_V6ONLY
+#endif
+ ],[
+ libreplace_cv_HAVE_IPV6_V6ONLY=yes
+ ],[
+ libreplace_cv_HAVE_IPV6_V6ONLY=no
+ ])
+])
+if test x"$libreplace_cv_HAVE_IPV6_V6ONLY" != x"yes"; then
+ dnl test for IPV6_V6ONLY
+ AC_CACHE_CHECK([for IPV6_V6ONLY in linux/in6.h],libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26,[
+ AC_TRY_COMPILE([
+ #include <linux/in6.h>
+ ],
+ [
+ #if (IPV6_V6ONLY != 26)
+ #error no linux IPV6_V6ONLY
+ #endif
+ ],[
+ libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=yes
+ ],[
+ libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26=no
+ ])
+ ])
+ if test x"$libreplace_cv_HAVE_LINUX_IPV6_V6ONLY_26" = x"yes"; then
+ AC_DEFINE(HAVE_LINUX_IPV6_V6ONLY_26,1,[Whether the system has IPV6_V6ONLY in linux/in6.h])
+ fi
+fi
+
dnl test for ipv6
AC_CACHE_CHECK([for ipv6 support],libreplace_cv_HAVE_IPV6,[
AC_TRY_LINK([
@@ -395,6 +439,14 @@ if (ret != 0) {
const char *es = gai_strerror(ret);
}
freeaddrinfo(ai);
+{
+ int val = 1;
+ #ifdef HAVE_LINUX_IPV6_V6ONLY_26
+ #define IPV6_V6ONLY 26
+ #endif
+ ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+ (const void *)&val, sizeof(val));
+}
],[
libreplace_cv_HAVE_IPV6=yes
],[
diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index 1f51035..93d533c 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -360,6 +360,13 @@ struct addrinfo {
#define ifr_netmask ifr_addr
#endif
+/* Some old Linux systems have broken header files */
+#ifdef HAVE_IPV6
+#ifdef HAVE_LINUX_IPV6_V6ONLY_26
+#define IPV6_V6ONLY 26
+#endif /* HAVE_LINUX_IPV6_V6ONLY_26 */
+#endif /* HAVE_IPV6 */
+
#ifdef SOCKET_WRAPPER
#ifndef SOCKET_WRAPPER_DISABLE
#ifndef SOCKET_WRAPPER_NOT_REPLACE
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 63acf26..cfb4181 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -99,6 +99,25 @@ def configure(conf):
'socket nsl', checklibc=True,
headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h')
+ # Some old Linux systems have broken header files and
+ # miss the IPV6_V6ONLY define in netinet/in.h,
+ # but have it in linux/in6.h.
+ # We can't include both files so we just check if the value
+ # if defined and do the replacement in system/network.h
+ if not conf.CHECK_VARIABLE('IPV6_V6ONLY',
+ headers='sys/socket.h netdb.h netinet/in.h'):
+ conf.CHECK_CODE('''
+ #include <linux/in6.h>
+ #if (IPV6_V6ONLY != 26)
+ #error no IPV6_V6ONLY support on linux
+ #endif
+ int main(void) { return IPV6_V6ONLY; }
+ ''',
+ define='HAVE_LINUX_IPV6_V6ONLY_26',
+ addmain=False,
+ msg='Checking for IPV6_V6ONLY in linux/in6.h',
+ local_include=False)
+
conf.CHECK_CODE('''
struct sockaddr_storage sa_store;
struct addrinfo *ai = NULL;
@@ -110,6 +129,14 @@ def configure(conf):
const char *es = gai_strerror(ret);
}
freeaddrinfo(ai);
+ {
+ int val = 1;
+ #ifdef HAVE_LINUX_IPV6_V6ONLY_26
+ #define IPV6_V6ONLY 26
+ #endif
+ ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+ (const void *)&val, sizeof(val));
+ }
''',
define='HAVE_IPV6',
lib='nsl socket',
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 220924c..43defb3 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -1206,7 +1206,7 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local,
bsds->fd = fd;
talloc_set_destructor(bsds, tdgram_bsd_destructor);
-#if defined(HAVE_IPV6) && defined(IPV6_V6ONLY)
+#ifdef HAVE_IPV6
if (do_ipv6only) {
int val = 1;
@@ -2037,7 +2037,7 @@ static struct tevent_req * tstream_bsd_connect_send(TALLOC_CTX *mem_ctx,
goto post;
}
-#if defined(HAVE_IPV6) && defined(IPV6_V6ONLY)
+#ifdef HAVE_IPV6
if (do_ipv6only) {
int val = 1;
--
Samba Shared Repository
More information about the samba-cvs
mailing list