summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2017-02-24 13:25:25 -0500
committerJ. Bruce Fields <bfields@redhat.com>2017-02-24 17:04:48 -0500
commit7259f1dfe718234fee3f87d98d082e7f98d1d712 (patch)
tree47c43ca6973a2ee3f5e728d6b66c6bf85f18e16e
parent5283b03ee5cd28d516646298bead09b238d92ddc (diff)
downloadlinux-7259f1dfe718234fee3f87d98d082e7f98d1d712.tar.gz
linux-7259f1dfe718234fee3f87d98d082e7f98d1d712.tar.bz2
linux-7259f1dfe718234fee3f87d98d082e7f98d1d712.zip
sunrpc: don't register UDP port with rpcbind when version needs congestion control
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--net/sunrpc/svc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 1fc3ff822168..8492acb4011f 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);