diff mbox

When trying to establish privileged source port number of tcp connection, use 1 instead of 0 as start port, as 0 means that the kernel will choose the port number

Message ID 1440508327-6221-1-git-send-email-tigran.mkrtchyan@desy.de (mailing list archive)
State New, archived
Headers show

Commit Message

Mkrtchyan, Tigran Aug. 25, 2015, 1:12 p.m. UTC
From: Gil Amsalem <gil.amsalem@primarydata.com>

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 rpc/rpc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mkrtchyan, Tigran Aug. 25, 2015, 1:13 p.m. UTC | #1
Hi Bruce,

I got this patch through github, where I have a clone of the pynfs repository.

Tigran.

----- Original Message -----
> From: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> To: bfields@fieldses.org
> Cc: linux-nfs@vger.kernel.org, "Gil Amsalem" <gil.amsalem@primarydata.com>, "Tigran Mkrtchyan"
> <tigran.mkrtchyan@desy.de>
> Sent: Tuesday, August 25, 2015 3:12:07 PM
> Subject: [PATCH] When trying to establish privileged source port number of tcp connection, use 1 instead of 0 as start
> port, as 0 means that the kernel will choose the port number

> From: Gil Amsalem <gil.amsalem@primarydata.com>
> 
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
> rpc/rpc.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rpc/rpc.py b/rpc/rpc.py
> index 83a0222..1a3ca38 100644
> --- a/rpc/rpc.py
> +++ b/rpc/rpc.py
> @@ -824,7 +824,7 @@ class ConnectionHandler(object):
>         defer.wait()
>         return pipe
> 
> -    def bindsocket(self, s, port=0):
> +    def bindsocket(self, s, port=1):
>         """Scan up through ports, looking for one we can bind to"""
>         # This is necessary when we need to use a 'secure' port
>         using = port
> --
> 2.4.3
> 
> --
> 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
--
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/rpc/rpc.py b/rpc/rpc.py
index 83a0222..1a3ca38 100644
--- a/rpc/rpc.py
+++ b/rpc/rpc.py
@@ -824,7 +824,7 @@  class ConnectionHandler(object):
         defer.wait()
         return pipe
 
-    def bindsocket(self, s, port=0):
+    def bindsocket(self, s, port=1):
         """Scan up through ports, looking for one we can bind to"""
         # This is necessary when we need to use a 'secure' port
         using = port