diff options
author | shishir gowda <shishirng@gluster.com> | 2011-05-31 06:40:27 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 09:10:54 -0700 |
commit | d720547e9e5960481930f532fe208f7c6db4cd93 (patch) | |
tree | 7d7de5de6be1f6777fdde19ef3f9d1f121d8ffd3 /rpc/rpc-transport | |
parent | 756c7aea3fef2a77b13ed731ab202c5426db3768 (diff) |
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 <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2868 (Add xlator-option to support insecure-bind for clients)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2868
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r-- | rpc/rpc-transport/socket/src/name.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); } |