• Chuck Lever's avatar
    NFS: fix nfs_parse_ip_address() corner case · 5e2e7721
    Chuck Lever authored
    Bruce observed that nfs_parse_ip_address() will successfully parse an
    IPv6 address that looks like this:
    
      "::1%"
    
    A scope delimiter is present, but there is no scope ID following it.
    This is harmless, as it would simply set the scope ID to zero.  However,
    in some cases we would like to flag this as an improperly formed
    address.
    
    We are now also careful to reject addresses where garbage follows the
    address (up to the length of the string), instead of ignoring the
    non-address characters; and where the scope ID is nonsense (not a valid
    device name, but also not numeric).  Before, both of these cases would
    result in a harmless zero scope ID.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    5e2e7721
super.c 63.7 KB