Skip to content

Commit

Permalink
nfsd: allow configuring nfsd to listen on 5-digit ports
Browse files Browse the repository at this point in the history
Note a 16-bit value can require up to 5 digits.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Aug 21, 2012
1 parent 38af2ca commit a10fded
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ static ssize_t __write_ports_addxprt(char *buf)
int port, err;
struct net *net = &init_net;

if (sscanf(buf, "%15s %4u", transport, &port) != 2)
if (sscanf(buf, "%15s %5u", transport, &port) != 2)
return -EINVAL;

if (port < 1 || port > USHRT_MAX)
Expand Down

0 comments on commit a10fded

Please sign in to comment.