Commit a10fded1 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: allow configuring nfsd to listen on 5-digit ports

Note a 16-bit value can require up to 5 digits.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 38af2cab
...@@ -712,7 +712,7 @@ static ssize_t __write_ports_addxprt(char *buf) ...@@ -712,7 +712,7 @@ static ssize_t __write_ports_addxprt(char *buf)
int port, err; int port, err;
struct net *net = &init_net; struct net *net = &init_net;
if (sscanf(buf, "%15s %4u", transport, &port) != 2) if (sscanf(buf, "%15s %5u", transport, &port) != 2)
return -EINVAL; return -EINVAL;
if (port < 1 || port > USHRT_MAX) if (port < 1 || port > USHRT_MAX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment