Remote calls don't need to use privilege ports
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 20 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | rmtcalls: Don't use privileged ports for remote calls.src/ | +18 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] Remote calls don't need to use privilege ports
Over the weekend I did some experimenting with the remote call code in rpcbind. The code does functionally work but is very antiquated when it comes to the latest NFS versions.
Since only UDP sockets are used to do remote calls using the documented interfaces pmap_rmtcall() and callrpc() calls to NFS will fail (actual times out) since UDP is no longer supported.
The undocumented interface rpc_call() can be used to call into NFS since the protocol can specified, which also means the PMAPPROC_CALLIT protocol is not used.
It turns out privilege port are not needed to make remote calls, at least with my testing. I'm thinking the only reason privilege ports were being uses was a side effect of create_rmtcall_fd() calling svc_tli_create() with an unbound socket.
So the following patch simply binds the socket before calling svc_tli_create() which means a non-privilege port will be reserved for remote calls.
I'm thinking this is the simplest way to
not pollute the privilege port space.
Steve Dickson (1):
rmtcalls: Don't use privileged ports for remote calls.
src/rpcb_svc_com.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
Signature · 1 line
2.14.3