sunrpc: don't register UDP port with rpcbind when version needs congestion control
authorJeff Layton <jlayton@redhat.com>
Fri, 24 Feb 2017 18:25:25 +0000 (13:25 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 24 Feb 2017 22:04:48 +0000 (17:04 -0500)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svc.c

index 1fc3ff8221689e1c12e33f55dfbe6d56b688c2c1..8492acb4011f207ae8f2422e264ec73fc22d2867 100644 (file)
@@ -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);