aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-08-14 17:48:39 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-08-21 17:07:50 -0400
commita10fded18eb275e7e97e57e7542b16c665fe61ec (patch)
tree4171899172269fbc100107a17912429d0fcdad5b /fs
parent38af2cabb6285e1c44d2cc3165f150d2aa5f38a8 (diff)
nfsd: allow configuring nfsd to listen on 5-digit ports
Note a 16-bit value can require up to 5 digits. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfsctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 89be13c9e769..e41a08ffbe0a 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -712,7 +712,7 @@ static ssize_t __write_ports_addxprt(char *buf)
712 int port, err; 712 int port, err;
713 struct net *net = &init_net; 713 struct net *net = &init_net;
714 714
715 if (sscanf(buf, "%15s %4u", transport, &port) != 2) 715 if (sscanf(buf, "%15s %5u", transport, &port) != 2)
716 return -EINVAL; 716 return -EINVAL;
717 717
718 if (port < 1 || port > USHRT_MAX) 718 if (port < 1 || port > USHRT_MAX)