[4/4] sunrpc: don't register UDP port with rpcbind when version needs congestion control
diff mbox

Message ID 20170223170337.10686-5-jlayton@redhat.com
State New
Headers show

Commit Message

Jeff Layton Feb. 23, 2017, 5:03 p.m. UTC
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 net/sunrpc/svc.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 028c91a07950..984f1e73722f 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -976,6 +976,13 @@  int svc_register(const struct svc_serv *serv, struct net *net,
 			if (vers->vs_hidden)
 				continue;
 
+			/*
+			 * Don't register a UDP port if we need congestion
+			 * control.
+			 */
+			if (vers->vs_need_cong_ctrl && proto == IPPROTO_UDP)
+				continue;
+
 			error = __svc_register(net, progp->pg_name, progp->pg_prog,
 						i, family, proto, port);