2015-08-25 13:12:17

by Mkrtchyan, Tigran

[permalink] [raw]
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 <[email protected]>

Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
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



2015-08-25 13:13:42

by Mkrtchyan, Tigran

[permalink] [raw]
Subject: Re: [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

Hi Bruce,

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

Tigran.

----- Original Message -----
> From: "Tigran Mkrtchyan" <[email protected]>
> To: [email protected]
> Cc: [email protected], "Gil Amsalem" <[email protected]>, "Tigran Mkrtchyan"
> <[email protected]>
> 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 <[email protected]>
>
> Signed-off-by: Tigran Mkrtchyan <[email protected]>
> ---
> 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 [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html