summaryrefslogtreecommitdiffstats
path: root/support/export/export.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-10-13 11:22:07 -0400
committerSteve Dickson <steved@redhat.com>2010-10-14 10:26:58 -0400
commit656028f9925f5817c5a37565d27159973db84ec3 (patch)
tree25ba0e79cbd3d000035e399fe61ba8844fe6018c /support/export/export.c
parent1296be71ebae4c0d7da61cc1077d97562d3bc549 (diff)
downloadnfs-utils-656028f9925f5817c5a37565d27159973db84ec3.tar.gz
nfs-utils-656028f9925f5817c5a37565d27159973db84ec3.tar.xz
nfs-utils-656028f9925f5817c5a37565d27159973db84ec3.zip
libnfs.a: Allow multiple RPC listeners to share listener port number
Normally, when "-p" is not specified on the mountd command line, the TI-RPC library chooses random port numbers for each listener. If a port number _is_ specified on the command line, all the listeners will get the same port number, so SO_REUSEADDR needs to be set on each socket. Thus we can't let TI-RPC create the listener sockets for us in this case; we must create them ourselves and then set SO_REUSEADDR (and other socket options) by hand. Different versions of the same RPC program have to share the same listener and SVCXPRT, so we have to cache xprts we create, and re-use them when additional requests for registration come from the application. Though it doesn't look like it, this fix was "copied" from the legacy rpc_init() function. It's more complicated for TI-RPC, of course, since a TI-RPC application can set up listeners with a nearly arbitrary number of address families and socket types, not just the two listeners that legacy RPC applications can set up (one for AF_INET UDP and one for AF_INET TCP). See: https://bugzilla.linux-nfs.org/show_bug.cgi?id=190 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/export/export.c')
0 files changed, 0 insertions, 0 deletions