2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-24 02:58:38 +00:00

215 Commits

Author SHA1 Message Date
Andreas Gustafsson
91cd0f93ad sizeof style 2001-11-27 01:56:32 +00:00
Andreas Gustafsson
f1b6872550 Do not put a space before ';' when terminating a statement or in a 'for' statement. 2001-11-27 00:56:32 +00:00
Mark Andrews
f498427f17 theoretically potential file descriptor leak. 2001-11-09 00:37:10 +00:00
Andreas Gustafsson
ea01b618d9 1114. [port] Ignore more accept() errors. [RT #2021] 2001-11-08 20:24:25 +00:00
Andreas Gustafsson
65775fe205 1081. [bug] Multicast queries were incorrectly identified
based on the source address, not the destination
                        address.
(from JINMEI Tatuya)
2001-10-31 01:24:58 +00:00
Andreas Gustafsson
a9bc22bf37 if() statement needs braces after isc__strerror() call added 2001-10-22 20:57:41 +00:00
Andreas Gustafsson
1de63e34f1 1004. [port] Deal with recvfrom() returning EHOSTDOWN. [RT #1770] 2001-09-18 22:54:02 +00:00
Mark Andrews
4b87939256 strerror() -> isc__strerror() [RT #1689] 2001-08-31 05:57:58 +00:00
Mark Andrews
2c0b26955e 961. [bug] Tried to use a IPV6 feature when ISC_PLATFORM_HAVEIPV6
was not defined.  [RT #1482]
2001-08-16 07:27:48 +00:00
Mark Andrews
8ff4edd14e silence format warning: remove unused arg. 2001-08-12 00:12:14 +00:00
Andreas Gustafsson
76c8294c81 format string bugs and improved format string checking [RT #1578] 2001-08-08 22:54:55 +00:00
Andreas Gustafsson
aa0dc8d920 934. [port] Deal with systems where accept() spuriously returns
ECONNRESET.
2001-07-15 22:50:24 +00:00
Andreas Gustafsson
e76d4c91bf coding style 2001-07-09 21:06:30 +00:00
Brian Wellington
224e84bc0e misc. stuff related to [RT #1293] 2001-06-07 00:21:53 +00:00
David Lawrence
92ef1a9b9d use ISC_MAGIC for all magic numbers, for our friends in EBCDIC land 2001-06-04 19:33:39 +00:00
Andreas Gustafsson
740ae0808f when returning a socket error, use isc__errno2result() instead
of always returning ISC_R_UNEXPECTED
2001-05-14 23:58:33 +00:00
Andreas Gustafsson
fd5847ef09 828. [bug] The errno value from recvfrom() could be overwritten
by logging code. [RT #1293]
2001-05-14 18:20:03 +00:00
Andreas Gustafsson
5e194abb5b 814. [bug] Socket objects left over from accept() failures
were incorrectly destroyed, causing corruption
                        of socket manager data structures.

 813.   [bug]           File descriptors exceeding FD_SETSIZE were handled
                        badly. [RT #1192]
2001-04-26 23:45:55 +00:00
Andreas Gustafsson
0dc1e14537 alphabetized includes 2001-04-24 18:40:07 +00:00
Andreas Gustafsson
7900390a52 Previous change turned invalid peer address returns from accept()
into hard errors - they should be soft errors
2001-04-10 21:48:27 +00:00
Andreas Gustafsson
a84cfaa3f2 The bug fix in socket.c 1.189 was less than ideal: if a socket
got wedged in a state where accept() always returns EBADF, the server would loop calling
internal_accept() repeatedly.  Implemented an alternative fix where a hard
error in accept() causes an event with a nonzero result code to be sent, and
the new socket object to be freed
2001-04-10 21:38:33 +00:00
Brian Wellington
2eb3dafdcf Add the socket flag ISC_R_NORETRY, which makes the socket code treat
a soft error as a hard error on send (that is, not retry it).  It also
modifies the code calling sendmsg() to retry on EINTR.
2001-03-06 01:23:03 +00:00
Andreas Gustafsson
c05eeed3c9 754. [bug] Certain failure returns from sendto() could
cause the server to retry the transmission
                        indefinitely. [RT #902]
2001-02-24 23:51:09 +00:00
Brian Wellington
1f7f8d5c07 Add isc_socket_sendto2() and isc_socket_recv2(). These versions take
a partially constructed event and flags.  The flags can include
ISC_SOCKFLAG_IMMEDIATE, which means that if the operation completes, the
event is filled in and not sent.
2001-02-12 21:43:17 +00:00
Brian Wellington
1938554ccc consolidate duplicated code 2001-02-08 00:04:11 +00:00
Mark Andrews
df0bcff664 extend change #727 to check returned address length for zero. 2001-02-07 23:40:28 +00:00
Andreas Gustafsson
9a3ee1570d "hard" errors in accept() were handled really badly. They were logged
twice, and the socket object for the new socket was never destroyed,
causing the server to hang on exit (if multithreaded) or dump core on exit
(if singlethreaded).  Now the only difference between "hard" and "soft" errors
is that the latter are not logged.
2001-02-06 23:43:01 +00:00
Andreas Gustafsson
8dab78b566 as a workaround for various OS bugs, do not INSIST() that
accept() returns a valid peer address; instead just log an ugly error message
and continue if the peer address is left unchanged or insane by accept()
[RT #809]
2001-02-06 23:04:02 +00:00
Brian Wellington
6f9786fdcf Consolidate duplicated code in isc_socket_sendto[v] and isc_socket_recv[v]. 2001-01-27 06:41:36 +00:00
Brian Wellington
562f162981 remove unused labels 2001-01-27 01:16:09 +00:00
Brian Wellington
dd66e6306b Remove isc_socket/[send|recv]mark, which were never used. 2001-01-26 23:17:26 +00:00
Damien Neil
dfb0717d75 - Receive and send operations on UDP sockets no longer need to acquire
the socket lock.  (Assuming the operation succeeds immediately, and doesn't
need to be queued.)

- Communications with the watcher thread tweaked to reduce the need for
locking.
2001-01-25 22:25:10 +00:00
Brian Wellington
1e3bc7eaeb only use data from accept() if accept succeeds. 2001-01-23 21:07:12 +00:00
Andreas Gustafsson
b346ae570d style 2001-01-23 20:45:31 +00:00
Brian Wellington
e90441d922 INSIST that accept() returns a socket of the correct protocol family. Also
assign the "pf" field in the new socket.
2001-01-23 20:42:46 +00:00
Andreas Gustafsson
90bffb134e make_nonblock() errors were reported twice, and one of the instances
used the wrong errno value [RT #640]
2001-01-11 18:57:23 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
David Lawrence
801dceea23 Revert my last change. It was stupid, which I if I had been thinking clearly
I would have seen *before* I commited anything.  So, include isc/thread.h,
isc/mutex.h and isc/condition.h even if ISC_PLATFORM_USETHREADS is not defined.

(What caused me to bother with this at all was a problem that I resolved
a few days ago by fixing configure ... though now that I think about it,
that probably means there is some other latent problem with inconsistent
definitions that could maybe be handled better.  I'll look into it more
later, AFTER vacation.)
2000-12-26 21:45:08 +00:00
David Lawrence
bdcae3560b Only include isc/thread.h, isc/mutex.h and isc/condition.h if
ISC_PLATFORM_USETHREADS is defined.
2000-12-26 21:12:25 +00:00
Brian Wellington
a644e87df7 Move the msgcat stuff into socket_log(), to avoid unnecessary calls to
isc_msgcat_get() and speed things up.
2000-12-19 20:35:37 +00:00
Andreas Gustafsson
0833ef954a when code is duplicated (which it shouldn't be), it should at
least be duplicated consistently
2000-12-19 19:19:45 +00:00
Brian Wellington
17aac384e0 595. [port] On Linux 2.2, socket() returns EINVAL when it
should return EAFNOSUPPORT.  Work around this.
2000-12-06 01:53:38 +00:00
David Lawrence
9cd6d409b7 first pass at using isc_msgcat_get for message strings in libisc 2000-12-06 00:30:32 +00:00
Andreas Gustafsson
20e1ac3376 removed unused variable poke_needed 2000-11-22 23:48:14 +00:00
Andreas Gustafsson
0d8fe6131e treat EHOSTDOWN (if defined) the same as EHOSTUNREACH rather than as an
unexpected error [RT #215]
2000-11-17 21:04:12 +00:00
Brian Wellington
c0150ad6aa Don't call UNEXPECTED_ERROR if setsockopt(SO_TIMESTAMP) returns ENOPROTOOPT. 2000-10-12 00:35:49 +00:00
Brian Wellington
e0521dac5d Not all of the setsockopt failures logged the reason for failure. 2000-10-07 00:16:50 +00:00
Brian Wellington
0d89afffb2 Make sure #else and #endif for ISC_PLATFORM_USETHREADS are marked as such. 2000-09-28 21:31:08 +00:00
Michael Graff
08ad332552 put a break in the switch 2000-09-21 21:40:29 +00:00
Michael Graff
e710c2162a check for more expected error values in connect() case 2000-09-21 21:30:27 +00:00