Skip to content
Commit 8b4e87a1 authored by Ian Kent's avatar Ian Kent Committed by Trond Myklebust
Browse files

nfs: fix port value parsing



The valid values of nfs options port and mountport are 0 to USHRT_MAX.

The fs parser will return a fail for port values that are negative
and the sloppy option handling then returns success.

But the sloppy option handling is meant to return success for invalid
options not valid options with invalid values.

Restricting the sloppy option override to handle failure returns for
invalid options only is sufficient to resolve this problem.

Changes:

v2: utilize the return value from fs_parse() to resolve this problem
    instead of changing the parameter definitions.

Suggested-by: default avatarTrond Myklebust <trondmy@hammerspace.com>
Signed-off-by: default avatarIan Kent <raven@themaw.net>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent c77c738c
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