diff mbox

Use original reserved port setting for reconnect.

Message ID 1405007526-2234-1-git-send-email-srimalik@in.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srikrishan Malik July 10, 2014, 3:52 p.m. UTC
Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
---
Reconnect ignores the "--secure" arg after connection reset.                  
If the export is secure then OPs after reconnect fail with NFS4ERR_ACCESS.
 nfs4.0/lib/rpc/rpc.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

J. Bruce Fields July 11, 2014, 7:24 p.m. UTC | #1
Thanks, applying.--b.

On Thu, Jul 10, 2014 at 09:22:06PM +0530, Srikrishan Malik wrote:
> Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
> ---
> Reconnect ignores the "--secure" arg after connection reset.                  
> If the export is secure then OPs after reconnect fail with NFS4ERR_ACCESS.
>  nfs4.0/lib/rpc/rpc.py |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py
> index 8b39df4..5ef2e3e 100644
> --- a/nfs4.0/lib/rpc/rpc.py
> +++ b/nfs4.0/lib/rpc/rpc.py
> @@ -305,7 +305,8 @@ class RPCClient(object):
>          self.lock.acquire()
>          self._socket[t].close()
>          out = self._socket[t] = socket.socket(self.af, socket.SOCK_STREAM)
> -        # out.bind
> +        if self.uselowport:
> +            self.bindsocket(out)
>          out.connect((self.remotehost, self.remoteport))
>          out.settimeout(self.timeout)
>          self.lock.release()
> -- 
> 1.7.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/nfs4.0/lib/rpc/rpc.py b/nfs4.0/lib/rpc/rpc.py
index 8b39df4..5ef2e3e 100644
--- a/nfs4.0/lib/rpc/rpc.py
+++ b/nfs4.0/lib/rpc/rpc.py
@@ -305,7 +305,8 @@  class RPCClient(object):
         self.lock.acquire()
         self._socket[t].close()
         out = self._socket[t] = socket.socket(self.af, socket.SOCK_STREAM)
-        # out.bind
+        if self.uselowport:
+            self.bindsocket(out)
         out.connect((self.remotehost, self.remoteport))
         out.settimeout(self.timeout)
         self.lock.release()