diff options
-rw-r--r-- | cli/src/cli.c | 4 | ||||
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | glusterfs.spec.in | 14 | ||||
-rw-r--r-- | libglusterfs/src/compat.h | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 88 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 5 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/name.c | 6 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 14 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 4 | ||||
-rw-r--r-- | xlators/nfs/server/src/mount3.c | 9 | ||||
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 23 |
12 files changed, 1 insertions, 189 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index ba2ac43d7f3..574ee0eea33 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -613,11 +613,7 @@ cli_rpc_init (struct cli_state *state) int ret = -1; int port = CLI_GLUSTERD_PORT; xlator_t *this = NULL; -#ifdef IPV6_DEFAULT - char *addr_family = "inet6"; -#else char *addr_family = "inet"; -#endif this = THIS; cli_rpc_prog = &cli_prog; diff --git a/configure.ac b/configure.ac index 4ffbcc83ef4..a1a5b3f034b 100644 --- a/configure.ac +++ b/configure.ac @@ -309,13 +309,6 @@ else CFLAGS="${CFLAGS} -g" fi -AC_ARG_WITH([fbextras], AC_HELP_STRING([--with-fbextras], [Enable Facebook specific extras.])) -if test "x$with_fbextras" = "xyes"; then - BUILD_FBEXTRAS=yes -else - BUILD_FBEXTRAS=no -fi - AC_ARG_ENABLE([privport_tracking], AC_HELP_STRING([--disable-privport_tracking], [Disable internal tracking of privileged ports.])) @@ -1070,13 +1063,6 @@ AC_SUBST(GF_DISTRIBUTION) GF_HOST_OS="" GF_LDFLAGS="-rdynamic" -dnl include tirpc for FB builds -if test "x$BUILD_FBEXTRAS" = "xyes"; then - TIRPC_CFLAGS="-I/usr/include/tirpc" - GF_LDFLAGS="-lfbtirpc $GF_LDFLAGS" - GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS -DIPV6_DEFAULT" -fi - dnl check for gcc -Werror=format-security saved_CFLAGS=$CFLAGS CFLAGS="-Wformat -Werror=format-security" @@ -1555,7 +1541,6 @@ AC_SUBST([GF_CPPFLAGS]) AM_CONDITIONAL([GF_LINUX_HOST_OS], test "${GF_HOST_OS}" = "GF_LINUX_HOST_OS") AM_CONDITIONAL([GF_DARWIN_HOST_OS], test "${GF_HOST_OS}" = "GF_DARWIN_HOST_OS") AM_CONDITIONAL([GF_BSD_HOST_OS], test "${GF_HOST_OS}" = "GF_BSD_HOST_OS") -AM_CONDITIONAL([GF_FBEXTRAS], test "${BUILD_FBEXTRAS}" = "yes") AC_SUBST(GLUSTERD_WORKDIR) AM_CONDITIONAL([GF_INSTALL_GLUSTERD_WORKDIR], test ! -d ${GLUSTERD_WORKDIR} && test -d ${sysconfdir}/glusterd ) diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 65e684be320..7c092492751 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -17,10 +17,6 @@ # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with valgrind %{?_with_valgrind:%global _with_valgrind --enable-valgrind} -# if you wish to compile an rpm with Facebook specfic extras... -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with fbextras -%{?_with_fbextras:%global _with_fbextras --with-fbextras} - # if you wish to compile an rpm with cmocka unit testing... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with cmocka %{?_with_cmocka:%global _with_cmocka --enable-cmocka} @@ -219,9 +215,6 @@ BuildRequires: python2-devel %if ( 0%{?fedora} && 0%{?fedora} < 26 ) || ( 0%{?rhel} ) BuildRequires: python-ctypes %endif -%if ( 0%{?_with_fbextras:1} ) -BuildRequires: fb-libtirpc fb-libtirpc-devel -%endif BuildRequires: userspace-rcu-devel >= 0.7 %if ( 0%{?rhel} && 0%{?rhel} <= 6 ) BuildRequires: automake @@ -556,9 +549,6 @@ Requires: %{name}-cli%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} # some daemons (like quota) use a fuse-mount, glusterfsd is part of -fuse Requires: %{name}-fuse%{?_isa} = %{version}-%{release} -%if ( 0%{?_with_fbextras:1} ) -Requires: fb-libtirpc >= 0.2.5-1 -%endif # self-heal daemon, rebalance, nfs-server etc. are actually clients Requires: %{name}-api%{?_isa} = %{version}-%{release} Requires: %{name}-client-xlators%{?_isa} = %{version}-%{release} @@ -675,9 +665,7 @@ export CFLAGS %{?_without_ocf} \ %{?_without_rdma} \ %{?_without_syslog} \ - %{?_without_tiering} \ - %{?_without_events} \ - %{?_with_fbextras} + %{?_without_tiering} # fix hardening and remove rpath in shlibs %if ( 0%{?fedora} && 0%{?fedora} > 17 ) || ( 0%{?rhel} && 0%{?rhel} > 6 ) diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h index 0f61aaae55e..fbaac76b9ee 100644 --- a/libglusterfs/src/compat.h +++ b/libglusterfs/src/compat.h @@ -479,8 +479,6 @@ int gf_mkostemp (char *tmpl, int suffixlen, int flags); #define ST_CTIM_NSEC_SET(stbuf, val) do { } while (0); #endif -#ifndef IPV6_DEFAULT - #ifndef IXDR_GET_LONG #define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf)) #endif @@ -497,8 +495,6 @@ int gf_mkostemp (char *tmpl, int suffixlen, int flags); #define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG(buf, (long)(v)) #endif -#endif /* IPV6_DEFAULT */ - #if defined(__GNUC__) && !defined(RELAX_POISONING) /* Use run API, see run.h */ #include <stdlib.h> /* system(), mkostemp() */ diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 4c3d5279fe1..fc26f462c31 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -656,11 +656,7 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, dict_t *dict = NULL; char *host = NULL; int ret = -1; -#ifdef IPV6_DEFAULT - char *addr_family = "inet6"; -#else char *addr_family = "inet"; -#endif GF_ASSERT (options); GF_ASSERT (hostname); diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 4cd2be17085..ce4e2bf0dc2 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -37,10 +37,6 @@ #include <stdarg.h> #include <stdio.h> -#ifdef IPV6_DEFAULT -#include <netconfig.h> -#endif - #include "xdr-rpcclnt.h" #include "glusterfs-acl.h" @@ -1390,82 +1386,6 @@ rpcsvc_error_reply (rpcsvc_request_t *req) return rpcsvc_submit_generic (req, &dummyvec, 0, NULL, 0, NULL); } -#ifdef IPV6_DEFAULT -int -rpcsvc_program_register_rpcbind6 (rpcsvc_program_t *newprog, uint32_t port) -{ - const int IP_BUF_LEN = 64; - char addr_buf[IP_BUF_LEN]; - - int err = 0; - bool_t success = 0; - struct netconfig *nc; - struct netbuf *nb; - - if (!newprog) { - goto out; - } - - nc = getnetconfigent ("tcp6"); - if (!nc) { - err = -1; - goto out; - } - - - err = sprintf (addr_buf, "::.%d.%d", port >> 8 & 0xff, - port & 0xff); - if (err < 0) { - err = -1; - goto out; - } - - nb = uaddr2taddr (nc, addr_buf); - if (!nb) { - err = -1; - goto out; - } - - success = rpcb_set (newprog->prognum, newprog->progver, nc, nb); - if (!success) { - gf_log (GF_RPCSVC, GF_LOG_ERROR, "Could not register the IPv6" - " service with rpcbind"); - } - - err = 0; - -out: - return err; -} - -int -rpcsvc_program_unregister_rpcbind6 (rpcsvc_program_t *newprog) -{ - int err = 0; - bool_t success = 0; - struct netconfig *nc; - - if (!newprog) { - goto out; - } - - nc = getnetconfigent ("tcp6"); - if (!nc) { - err = -1; - goto out; - } - - success = rpcb_unset (newprog->prognum, newprog->progver, nc); - if (!success) { - gf_log (GF_RPCSVC, GF_LOG_ERROR, "Could not unregister the IPv6" - " service with rpcbind"); - } - - err = 0; -out: - return err; -} -#endif /* Register the program with the local portmapper service. */ int @@ -1630,14 +1550,6 @@ rpcsvc_program_unregister (rpcsvc_t *svc, rpcsvc_program_t *program) " program failed"); goto out; } -#ifdef IPV6_DEFAULT - ret = rpcsvc_program_unregister_rpcbind6 (program); - if (ret == -1) { - gf_log (GF_RPCSVC, GF_LOG_ERROR, "rpcbind (ipv6)" - " unregistration of program failed"); - goto out; - } -#endif pthread_mutex_lock (&svc->rpclock); { list_for_each_entry (prog, &svc->programs, program) { diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index 8097a525dab..cf3e5906de1 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -434,11 +434,6 @@ rpcsvc_listener_destroy (rpcsvc_listener_t *listener); extern int rpcsvc_program_register_portmap (rpcsvc_program_t *newprog, uint32_t port); -#ifdef IPV6_DEFAULT -extern int -rpcsvc_program_register_rpcbind6 (rpcsvc_program_t *newprog, uint32_t port); -#endif - extern int rpcsvc_program_unregister_portmap (rpcsvc_program_t *newprog); diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index 56e9bb8d31b..04dc2a989a7 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -561,14 +561,8 @@ server_fill_address_family (rpc_transport_t *this, sa_family_t *sa_family) { data_t *address_family_data = NULL; int32_t ret = -1; - -#ifdef IPV6_DEFAULT - char *addr_family = "inet6"; - sa_family_t default_family = AF_INET6; -#else char *addr_family = "inet"; sa_family_t default_family = AF_INET; -#endif GF_VALIDATE_OR_GOTO ("socket", sa_family, out); diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index e3e9d98801b..8ba2692cdc6 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3132,20 +3132,6 @@ socket_connect (rpc_transport_t *this, int port) } } - /* Make sure we are not vulnerable to someone setting - * net.ipv6.bindv6only to 1 so that gluster services are - * avalable over IPv4 & IPv6. - */ - int disable_v6only = 0; - - if (setsockopt (priv->sock, IPPROTO_IPV6, IPV6_V6ONLY, - (void *)&disable_v6only, - sizeof (disable_v6only)) < 0) { - gf_log (this->name, GF_LOG_WARNING, - "Error disabling sockopt IPV6_V6ONLY: \"%s\"", - strerror (errno)); - } - if (priv->nodelay && (sa_family != AF_UNIX)) { ret = __socket_nodelay (priv->sock); diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index 2dd5a92f310..6bb81c14d89 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -287,11 +287,7 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req) int32_t type = 0; char *username = NULL; char *password = NULL; -#ifdef IPV6_DEFAULT - char *addr_family = "inet6"; -#else char *addr_family = "inet"; -#endif GF_ASSERT (req); diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c index 2d022263aca..12f52e4f5d0 100644 --- a/xlators/nfs/server/src/mount3.c +++ b/xlators/nfs/server/src/mount3.c @@ -4152,15 +4152,6 @@ mnt1svc_init (xlator_t *nfsx) } } -#ifdef IPV6_DEFAULT - ret = dict_set_str (options, "transport.address-family", "inet6"); - if (ret == -1) { - gf_log (GF_NFS, GF_LOG_ERROR, - "dict_set_str error when trying to enable ipv6"); - goto err; - } -#endif - ret = rpcsvc_create_listeners (nfs->rpcsvc, options, nfsx->name); if (ret == -1) { gf_msg (GF_NFS, GF_LOG_ERROR, errno, diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 1973b95c5a5..c2c3c863b05 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -204,9 +204,6 @@ nfs_program_register_portmap_all (struct nfs_state *nfs) if (nfs->override_portnum) prog->progport = nfs->override_portnum; (void) rpcsvc_program_register_portmap (prog, prog->progport); -#ifdef IPV6_DEFAULT - (void) rpcsvc_program_register_rpcbind6 (prog, prog->progport); -#endif } return (0); @@ -342,17 +339,6 @@ nfs_init_versions (struct nfs_state *nfs, xlator_t *this) if (version->required) goto err; } -#ifdef IPV6_DEFAULT - ret = rpcsvc_program_register_rpcbind6 (prog, - prog->progport); - if (ret == -1) { - gf_msg (GF_NFS, GF_LOG_ERROR, 0, - NFS_MSG_PGM_REG_FAIL, - "Program (ipv6) %s registration failed", - prog->progname); - goto err; - } -#endif } } @@ -915,15 +901,6 @@ nfs_init_state (xlator_t *this) } } -#ifdef IPV6_DEFAULT - ret = dict_set_str (this->options, "transport.address-family", - "inet6"); - if (ret == -1) { - gf_log (GF_NFS, GF_LOG_ERROR, "dict_set_str error"); - goto free_foppool; - } -#endif - /* Right only socket support exists between nfs client and * gluster nfs, so we can set default value as socket |