linux/net/sunrpc
Chuck Lever 2e738fdce2 SUNRPC: Add API to acquire source address
NFSv4.0 clients must send endpoint information for their callback
service to NFSv4.0 servers during their first contact with a server.
Traditionally on Linux, user space provides the callback endpoint IP
address via the "clientaddr=" mount option.

During an NFSv4 migration event, it is possible that an FSID may be
migrated to a destination server that is accessible via a different
source IP address than the source server was.  The client must update
callback endpoint information on the destination server so that it can
maintain leases and allow delegation.

Without a new "clientaddr=" option from user space, however, the
kernel itself must construct an appropriate IP address for the
callback update.  Provide an API in the RPC client for upper layer
RPC consumers to acquire a source address for a remote.

The mechanism used by the mount.nfs command is copied: set up a
connected UDP socket to the designated remote, then scrape the source
address off the socket.  We are careful to select the correct network
namespace when setting up the temporary UDP socket.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-03-02 15:36:53 -05:00
..
auth_gss SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field 2012-03-02 15:36:38 -05:00
xprtrdma SUNRPC: create svc_xprt in proper network namespace 2011-12-06 16:20:42 -05:00
addr.c SUNRPC: parametrize rpc_uaddr2sockaddr() by network context 2012-01-31 19:28:12 -05:00
auth.c net: Remove unnecessary semicolons 2011-06-05 14:33:39 -07:00
auth_generic.c SUNRPC: Fix machine creds in generic_create_cred and generic_match 2012-01-23 14:03:46 -08:00
auth_null.c SUNRPC: Move the bound cred to struct rpc_rqst 2010-08-04 08:54:09 -04:00
auth_unix.c NFS/sunrpc: don't use a credential with extra groups. 2011-10-25 11:20:58 +02:00
backchannel_rqst.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
bc_svc.c SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
cache.c SUNRPC: generic cache register routines removed 2012-01-31 19:28:16 -05:00
clnt.c SUNRPC: Add API to acquire source address 2012-03-02 15:36:53 -05:00
Kconfig SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
Makefile SUNRPC: sunrpc should not explicitly depend on NFS config options 2011-07-15 09:12:23 -04:00
netns.h SUNRPC: create GSS auth cache per network namespace 2012-01-31 19:28:15 -05:00
rpc_pipe.c SUNRPC: Move clnt->cl_server into struct rpc_xprt 2012-03-02 15:36:41 -05:00
rpcb_clnt.c SUNRPC: Move clnt->cl_server into struct rpc_xprt 2012-03-02 15:36:41 -05:00
sched.c SUNRPC: Ensure that we can trace waitqueues when !defined(CONFIG_SYSCTL) 2012-02-15 00:19:51 -05:00
socklib.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
stats.c SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field 2012-03-02 15:36:38 -05:00
sunrpc.h SUNRPC: subscribe RPC clients to pipefs notifications 2012-01-31 18:20:25 -05:00
sunrpc_syms.c SUNRPC: init per-net rpcbind spinlock 2012-02-16 14:00:48 -05:00
svc.c Lockd: per-net up and down routines introduced 2012-02-15 00:19:47 -05:00
svc_xprt.c SUNRPC: service destruction in network namespace context 2012-02-15 00:19:45 -05:00
svcauth.c net: sunrpc: kill unused macros 2010-12-17 15:48:21 -05:00
svcauth_unix.c SUNRPC: ip map cache per network namespace cleanup 2012-01-31 19:28:16 -05:00
svcsock.c SUNRPC: fixup for namespace changes 2012-01-31 19:28:22 -05:00
sysctl.c SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
timer.c SUNRPC: Add documenting comments in net/sunrpc/timer.c 2009-08-09 15:09:47 -04:00
xdr.c NFSv4: include bitmap in nfsv4 get acl data 2012-01-05 10:42:42 -05:00
xprt.c SUNRPC: Move clnt->cl_server into struct rpc_xprt 2012-03-02 15:36:41 -05:00
xprtsock.c SUNRPC: add sending,pending queue and max slot to xprt stats 2012-02-16 14:55:27 -05:00