summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpcsvc.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2017-05-04 12:15:09 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2017-05-05 11:39:28 +0000
commitde80a9153e3b681d8b83aa6164c94e2829b9cf49 (patch)
treec811c06876f415991b63c5b3b6388e3bfb3a2528 /rpc/rpc-lib/src/rpcsvc.c
parent93ecfcddbfc6bdc77a720f55dbd51fc256961d68 (diff)
rpc: Remove accidental IPV6 changes
They snuck in with the HALO patch (07cc8679c) Change-Id: I8ced6cbb0b49554fc9d348c453d4d5da00f981f6 BUG: 1447953 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: https://review.gluster.org/17174 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c88
1 files changed, 0 insertions, 88 deletions
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) {