summaryrefslogtreecommitdiffstats
path: root/support/nfs/svc_create.c
Commit message (Collapse)AuthorAgeFilesLines
* rpc.mountd: let mountd consult /etc/services for portMi Jinlong2011-08-031-2/+7
| | | | | | | | | | | | At RHEL, if user set port for mountd at /etc/services as "mount 12345/tcp", mountd should be bind to 12345, but the latest nfs-utils, mountd get a rand port, not 12345. This patch make sure mountd be bind to the port which was set at /etc/service. Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libnfs.a: Allow multiple RPC listeners to share listener port numberChuck Lever2010-10-141-6/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Tone down a number xlog messages in svc_create_bindaddr()Steve Dickson2010-01-151-11/+5
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* statd: Support TI-RPC statd listenerChuck Lever2010-01-151-0/+252
If TI-RPC is available, use it to create statd's svc listener. If not, use the old function, rpc_init(), to create statd's listener. IPv6 can be supported if TI-RPC is available. In this case, /etc/netconfig is searched to determine which transports to advertise. Add the new listener creation API in libnfs.a since other components of nfs-utils (such as rpc.mountd) will eventually want to share it. A little re-arrangement of when the statd listener is created is done to make unregistration of the statd service more reliable. As it is now, the statd service is never unregistered when it exits. After it is gone, other programs usually hang when trying to access statd or see if it's running, since the registration is still there but statd itself does not respond. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>