summaryrefslogtreecommitdiff
path: root/socket.c
Commit message (Collapse)AuthorAgeFilesLines
* Instead of ignoring SIG_CHLD, reap zombies in the signal handler.Wayne Davison2003-08-041-8/+9
|
* Prevent the "Connection reset by peer" messages often seen from Cygwin.David Dykstra2003-01-271-1/+4
| | | | | Result of a lot of discussion over the last year and a half. Based on a patch from Randy O'Meara, cleaned up a bit by Max Bowsher.
* The function passed to start_accept_loop() now takes 2 fd ints (forWayne Davison2002-08-011-2/+2
| | | | the daemon via remote-shell support).
* Try to fix ctype issues by always calling these functions asMartin Pool2002-04-111-1/+1
| | | | | | | | | if (!isdigit(* (unsigned char *) p)) { so that the argument is always in the range of unsigned char when coerced to an int. (See digit 1.)
* Doc.Martin Pool2002-04-091-17/+20
| | | | | Correction from Nelson Beebe: argument to functions such as isspace() must be an int, not a char. This could cause sign-extension problems.
* Make sure that freeaddrinfo is called on all code paths leading awayMartin Pool2002-03-161-3/+3
| | | | | from a call to getaddrinfo. (Dave Dykstra) <20011219085021.A23107@lucent.com>
* Doc: Note from Dave Dykstra that getaddrinfo calls must be paired withMartin Pool2002-03-161-1/+4
| | | | freeaddrinfo().
* With -vv, client shows a message when opening a daemon connection viaMartin Pool2002-02-231-0/+4
| | | | | an HTTP proxy. This parallels the recent addition of a log message for opening ssh connections.
* Doc.Martin Pool2002-02-181-0/+1
|
* Fix error handling for failing to fork after accepting a connection --Martin Pool2002-02-181-2/+2
| | | | close fd, sleep, then try again.
* If the daemon is unable to fork a child to accept a connection, printMartin Pool2002-02-181-1/+12
| | | | an error message. (Colin Walters)
* Patch from Jos Backus <josb@cncdsl.com> to use HAVE_SOCKADDR_LEN ratherDavid Dykstra2002-02-131-1/+1
| | | | | than HAVE_SOCK_SIN_LEN around use of sin_len. Correct usage was already in place in clientname.c.
* The name resolution stuff is getting complicated -- split it out intoMartin Pool2002-01-251-216/+0
| | | | its own file.
* Verbose messages for spoof check... doesn't work on old linux libc?Martin Pool2002-01-241-4/+30
|
* When doing a name->addr translation to check for spoofing, give theMartin Pool2002-01-241-1/+1
| | | | | resolver the address family of the original address as a hint, so that we're more likely to find the correct A or AAAA record.,
* Fix getpeername call.Martin Pool2002-01-241-1/+1
|
* Move both calls to getpeername into a common wrapper function thatMartin Pool2002-01-241-22/+34
| | | | handles IPV4_MAPPED addresses.
* Another size_t warningMartin Pool2002-01-241-1/+1
|
* check_name: Print out name *before* clobbering it.Martin Pool2002-01-241-5/+5
|
* If name lookup fails, then show the relevant IP address in the error message.Martin Pool2002-01-241-22/+17
|
* Doc.Martin Pool2002-01-241-8/+2
| | | | Oops, connection program message was in the wrong place.
* Show helper program with -v when opening connection.Martin Pool2002-01-241-1/+10
| | | | Doc.
* Doc.Martin Pool2002-01-241-7/+10
|
* Fix constMartin Pool2002-01-241-2/+2
|
* Unbreak the old behavior of using UNKNOWN as a hostname if any of theMartin Pool2002-01-241-4/+10
| | | | | addr->name->addr translations fail, because people might count on this in "hosts deny" lines.
* Fix inverted sense of error check.Martin Pool2002-01-241-5/+6
|
* Refactor client_name() into smaller functions.Martin Pool2002-01-241-31/+75
| | | | | | | | Better messages for DNS failure. If we can get a reverse name for an IP address, but not confirm that it is correct using a forward lookup then we still proceed to use the name, but also emit a warning.
* Doc.Martin Pool2002-01-241-1/+4
|
* Just for variety we have some socklen_t fixes too.Martin Pool2002-01-231-3/+5
|
* Remove unused variable.Martin Pool2002-01-151-1/+0
|
* Oops, getaddrinfo returns an error code (not -1) for error. -Wall isMartin Pool2002-01-151-1/+1
| | | | good.
* More comments about IPv6 stuff.Martin Pool2002-01-111-5/+17
| | | | | If a reverse name lookup fails, show the name that we were trying to look up.
* TypoMartin Pool2001-12-181-1/+1
|
* Refactor code for setting local address on outgoing connections. If aMartin Pool2001-12-181-23/+38
| | | | local address is specified, then try all addrinfo records for it.
* Get rid of global_opts struct as suggested by Dave -- too manyMartin Pool2001-12-181-40/+29
| | | | | | | | | problems with initialization. Change the algorithm from trying to open an inbound socket with getaddrinfo: keep trying suggested addresses until we find one on which we can both get a socket and bind. Not convinced this is the best, but it's probably better.
* open_socket_in was attempting to try all the protocols returned fromDavid Dykstra2001-12-141-0/+1
| | | | | | | | getaddrinfo(), but only if a corresponding call to socket() returned one of three *NOSUPPORT errno codes. A Redhat 6.2 system was observed returning EINVAL instead so it never went on to try IPv4. This update adds EINVAL to the list. Question: why not always continue through the list regardless of what errno is?
* Some platforms don't have sa_family_t.Martin Pool2001-12-051-1/+1
|
* RFC2553 just says that sockaddr_storage has to have initial fieldsMartin Pool2001-12-051-2/+8
| | | | | | | isomorphic to sa_family etc from a struct sockaddr, not what they're called. On some platforms they seem not to be called ss_family. Rather than guess, we will try casting to a sockaddr and looking through that -- I think this is what the RFC intends.
* Some platforms may have getaddrinfo() but not sockaddr_storage.Martin Pool2001-12-051-4/+0
|
* Change back to using sockaddr_storage rather than sockaddr_in. IfMartin Pool2001-12-051-11/+19
| | | | | | | | | sockaddr_storage is not defined, then supply our own definition that will hopefully satisfy RFC2553 but also compile on all supported platforms. Thankyou to YOSHIFUJI Hideaki, SUMIKAWA Munechika and Jun-ichiro "itojun" Hagino.
* Fix missing parameter in log call.Martin Pool2001-11-271-1/+1
|
* Remove kame cruftMartin Pool2001-11-261-1/+1
|
* Oops, no C++ comments.Martin Pool2001-11-261-2/+0
|
* Kill a function for jra.Martin Pool2001-11-261-64/+1
|
* Try to be better about handling the results of getaddrinfo(): whenMartin Pool2001-11-261-17/+44
| | | | | | | | | | | | | opening an inbound socket, we might get several address results, e.g. for the machine's ipv4 and ipv6 name. If binding a wildcard, then any one of them should do. If an address was specified but it's insufficiently specific then that's not our fault. However, some of the advertized addresses may not work because e.g. we don't have IPv6 support in the kernel. In that case go on and try all addresses until one succeeds.
* Put the new address family option into an options struct. We have tooMartin Pool2001-11-261-19/+43
| | | | | | many globals already. Better error messages for network-related failures.
* Remove highly suspicious redefinition of sockaddr structure -- thereMartin Pool2001-11-261-18/+20
| | | | | seems no point using anything but the platform's native definition, and if we can't get that from the system headers we're hosed anyhow.
* Improved error messages.Martin Pool2001-11-241-8/+18
|
* Merge KAME.net IPv6 patch: you can now (in theory) pass IPv6 hostnamesMartin Pool2001-11-231-112/+178
| | | | | | or literal IP addresses to rsync, and if your platform supports them they will be used. Also there are -4 and -6 command-line options to choose the default address type. Thankyou!
* Merge in the LIBSMB_PROG idea from samba, so that you can doMartin Pool2001-08-311-4/+136
| | | | | | RSYNC_CONNECT_PROG='./rsync --daemon' ./rsync -vvvvvv localhost:: to test as a daemon without actually having to listen on a port.