1. 09 Aug, 2009 7 commits
    • Chuck Lever's avatar
      SUNRPC: Provide functions for managing universal addresses · a02d6926
      Chuck Lever authored
      Introduce a set of functions in the kernel's RPC implementation for
      converting between a socket address and either a standard
      presentation address string or an RPC universal address.
      
      The universal address functions will be used to encode and decode
      RPCB_FOO and NFSv4 SETCLIENTID arguments.  The other functions are
      part of a previous promise to deliver shared functions that can be
      used by upper-layer protocols to display and manipulate IP
      addresses.
      
      The kernel's current address printf formatters were designed
      specifically for kernel to user-space APIs that require a particular
      string format for socket addresses, thus are somewhat limited for the
      purposes of sunrpc.ko.  The formatter for IPv6 addresses, %pI6, does
      not support short-handing or scope IDs.  Also, these printf formatters
      are unique per address family, so a separate formatter string is
      required for printing AF_INET and AF_INET6 addresses.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      a02d6926
    • Chuck Lever's avatar
      SUNRPC: Move XDR data type size macros · 0b10bf5e
      Chuck Lever authored
      Clean up: To make subsequent patches cleaner, move the XDR data type
      size macros to the top of the file (similar to nfs4xdr.c) first.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      0b10bf5e
    • Chuck Lever's avatar
      SUNRPC: Clean up RPCBIND_MAXUADDRLEN definitions · 169026a6
      Chuck Lever authored
      Clean up: Replace the single-integer definition of RPCBIND_MAXUADDRLEN
      with a definition that is based on previously defined address string
      sizes, and document the way this maximum is calculated.  Also provide
      a separate macro for the size of the port number extension.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      169026a6
    • Chuck Lever's avatar
      NFS: Use the authentication flavor list returned by mountd · ec88f28d
      Chuck Lever authored
      Commit a14017db added support in the kernel's NFS mount client to
      decode the authentication flavor list returned by mountd.
      
      The NFS client can now use this list to determine whether the
      authentication flavor requested by the user is actually supported
      by the server.
      
      Note we don't actually negotiate the security flavor if none was
      specified by the user.  Instead, we try to use AUTH_SYS, and fail if
      the server does not support it.  This prevents us from negotiating
      an inappropriate security flavor (some servers list AUTH_NULL first).
      
      If the server does not support AUTH_SYS, the user must provide an
      appropriate security flavor by specifying the "sec=" mount option.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      ec88f28d
    • Chuck Lever's avatar
      NFS: Fix auth flavor len accounting · 059f90b3
      Chuck Lever authored
      Previous logic in the NFS mount parsing code path assumed
      auth_flavor_len was set to zero for simple authentication flavors
      (like AUTH_UNIX), and 1 for compound flavors (like AUTH_GSS).
      
      At some earlier point (maybe even before the option parsers were
      merged?) specific checks for auth_flavor_len being zero were removed
      from the functions that validate the mount option that sets the mount
      point's authentication flavor.
      
      Since we are populating an array for authentication flavors, the
      auth_flavor_len should always be set to the number of flavors.  Let's
      eliminate some cleverness here, and prepare for new logic that needs
      to know the number of flavors in the auth_flavors[] array.
      
      (auth_flavors[] is an array because at some point we want to allow a
      list of acceptable authentication flavors to be specified via the sec=
      mount option.  For now it remains a single element array).
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      059f90b3
    • Chuck Lever's avatar
      NFS: Add ability to send MOUNTPROC_UMNT to the kernel's mountd client · 0b524123
      Chuck Lever authored
      After certain failure modes of an NFS mount, an NFS client should send
      a MOUNTPROC_UMNT request to remove the just-added mount entry from the
      server's mount table.  While no-one should rely on the accuracy of the
      server's mount table, sending a UMNT is simply being a good internet
      neighbor.
      
      Since NFS mount processing is handled in the kernel now, we will need
      a function in the kernel's mountd client that can post a MOUNTRPC_UMNT
      request, in order to handle these failure modes.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      0b524123
    • Chuck Lever's avatar
      NFS: Fix up new minorversion= option · f3f4f4ed
      Chuck Lever authored
      The new minorversion= mount option (commit 3fd5be9e) was merged at
      the same time as the recent sloppy parser fixes (commit a5a16bae),
      so minorversion= still uses the old value parsing logic.
      
      If the minorversion= option specifies a bogus value, it should fail
      with "bad value" not "bad option."
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      f3f4f4ed
  2. 08 Aug, 2009 5 commits
  3. 07 Aug, 2009 28 commits