]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
nfsd: allow configuring nfsd to listen on 5-digit ports
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 14 Aug 2012 21:48:39 +0000 (17:48 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 21 Aug 2012 21:07:50 +0000 (17:07 -0400)
Note a 16-bit value can require up to 5 digits.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsctl.c

index 89be13c9e769f0d6276a35e0af6111e57b4c45e6..e41a08ffbe0a5b1b289df4222278048691d62e43 100644 (file)
@@ -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)