summaryrefslogtreecommitdiffstats
path: root/support/nfs/svc_socket.c
Commit message (Collapse)AuthorAgeFilesLines
* pdate addres for Free Software FoundationNeilBrown2011-08-291-2/+2
| | | | | | | | | | | | License texts contain multiple address for FSF, some wrong. So update them and replace COPYING file with http://www.gnu.org/licenses/gpl-2.0.txt which has a few changes to preamble and commentary. Also remove extra COPYING file from utils/statd/ Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.mountd: let mountd consult /etc/services for portMi Jinlong2011-08-031-43/+37
| | | | | | | | | | | | 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>
* Remove warnings from svc_socket.cSteve Dickson2010-08-091-3/+3
| | | | | | | svc_socket.c: In function 'svcudp_socket': svc_socket.c:160: warning: unused parameter 'reuse' Signed-off-by: Steve Dickson <steved@redhat.com>
* Be more cautious about use for privilege ports (<1024).Neil Brown2007-04-161-3/+0
| | | | | | | | | | | | | Ports < 1024 are a scarce resource and should not be used carelessly. Technically they should be not used at all without registration with IANA, but sometimes we need them despite that. So: for the socket that RPC services listen on, don't use a <1024 port by default. There is no need. For sockets that we send messages on, that are long-lived, and that might need to appear 'privileged', avoid using a number that is registered in /etc/services if possible.
* Never set SO_REUSEADDR on a UDP socket.Neil Brown2007-03-221-1/+1
| | | | | | | | The effect is quite different from TCP sockets. For TCP, it allows you to listen for new connections even if there are outstanding old connections with the same local address. For UDP, it allows other people to steal your packets by binding to the same address.
* Make UDP sockets not blockingNeil Brown2007-02-051-4/+15
| | | | | | | | | This is needs if mountd is running multithreaded else multiple threads will be blocked on a UDP port with nothing to read and so won't be able to serve up-calls from the kernel. Thanks to "Murali Krishna V" <vm.krishna@gmail.com> for highlighting the problem.
* Use memset instead of __bzero.Steinar H. Gunderson2007-02-051-1/+1
| | | | | | | | | bzero has been deprecated for years (and anything starting with __ is an internal function anyhow), and __bzero seems to have broken on ia64 not too long ago. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix various issues discovered by CoverityNeil Brown2006-06-231-1/+1
| | | | Thanks to Michael Halcrow for finding them.
* multiple threads for mountdGreg Banks2006-06-161-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How about the attached patch against nfs-utils tot? It adds a -t option to set the number of forked workers. Default is 1 thread, i.e. the old behaviour. I've verified that showmount -e, the Ogata mount client, and a real mount from Linux and IRIX boxes work with and without the new option. I've verified that you can manually kill any of the workers without the portmap registration going away, that killing all the workers causes the manager process to wake up and unregister, and killing the manager process causes the workers to be killed and portmap unregistered. I've verified that all the workers have file descriptors for the udp socket and the tcp rendezvous socket, that connections are balanced across all the workers if service times are sufficiently long, and that performance is improved by that parallelism, at least for small numbers of threads. For example, with 60 parallel MOUNT calls and a testing patch to make DNS lookups take 100 milliseconds time to perform all mounts (averaged over 5 runs) is: num elapsed threads time (sec) ------ ---------- 1 13.125 2 6.859 3 4.836 4 3.841 5 3.303 6 3.100 7 3.078 8 3.018 Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI.
* 2002-09-12 H.J. Lu <hjl@lucon.org>hjl2002-09-131-7/+0
| | | | | * support/nfs/svc_socket.c: Remove HAVE_SVCTCP_SOCKET and HAVE_SVCUDP_SOCKET.
* support/nfs/svc_socket.c: New.hjl2002-09-121-0/+187