From d720547e9e5960481930f532fe208f7c6db4cd93 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 31 May 2011 06:40:27 +0000 Subject: client_bind: When allow-insecure xlator option is set, donot bind. There is no need to bind a client, as connect will assign a port. Signed-off-by: shishir gowda Signed-off-by: Anand Avati BUG: 2868 (Add xlator-option to support insecure-bind for clients) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2868 --- rpc/rpc-transport/socket/src/name.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index 45d01111e..d310b0f8a 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -437,9 +437,7 @@ client_bind (rpc_transport_t *this, *sockaddr_len = sizeof (struct sockaddr_in); case AF_INET6: - if (this->client_bind_insecure) { - ret = bind (sock, sockaddr, *sockaddr_len); - } else { + if (!this->client_bind_insecure) { ret = af_inet_bind_to_port_lt_ceiling (sock, sockaddr, *sockaddr_len, CLIENT_PORT_CEILING); } -- cgit