Commit Graph
12775 Commits
Author SHA1 Message Date
Evan Hunt 600364259a fixup! Active sockets and handles tracing 2020-09-03 12:37:10 -07:00
Evan Hunt 128acf9fac add readhandle/sendhandle to httpd 2020-09-03 12:33:54 -07:00
Evan Hunt 7e334da824 style, naming, comment clenaup 2020-09-03 12:26:31 -07:00
Evan Hunt 0d9a516323 dnslisten_readcb needs to detach handle when result is ISC_R_CANCELED 2020-09-03 00:12:16 -07:00
Evan Hunt 6cee82ba3a fixup! Active sockets and handles tracing 2020-09-02 16:52:30 -07:00
Evan Hunt 673c476037 checkpoint: add handles to controlconnection structure and rndc
this also removes the readhandle from isccc_ccmsg_readmessage(); we'll
expect the caller to hold that reference.
2020-09-02 16:07:23 -07:00
Witold Kręcicki c421039402 Active sockets and handles tracing 2020-09-02 17:57:44 +02:00
Evan Hunt f89a9957b3 checkpoint: add a readhandle in lib/isccc 2020-09-01 15:57:30 -07:00
Evan Hunt 7627cdefe9 fixup! checkpoint: separate client handle pointers for different uses 2020-08-31 13:15:22 -07:00
Evan Hunt f9cc0b3639 fixup! checkpoint: separate client handle pointers for different uses 2020-08-31 11:12:41 -07:00
Evan Hunt b3c77ade26 fixup! checkpoint: separate client handle pointers for different uses 2020-08-31 11:12:41 -07:00
Evan Hunt f5b70924e3 checkpoint: separate client handle pointers for different uses 2020-08-31 11:12:41 -07:00
Evan Hunt 670560a223 fixup! XXX WiP: isc_nmhandle attach/detach 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt 2899eb1e8c XXX WiP: isc_nmhandle attach/detach 2020-08-31 11:12:41 -07:00
Evan Hunt 4dde1b4558 fixup! checkpoint: implement isc_nm_read() for UDP 2020-08-31 11:12:41 -07:00
Evan Hunt 725d973ab9 fixup! nghttp2-based HTTP client with DoH support 2020-08-31 11:12:41 -07:00
Evan Hunt 06d6627457 conform url code to isc style
- move url_parser code to lib/isc/url.c
- update style and nomenclature
2020-08-31 11:12:41 -07:00
Evan Hunt 0c41c19cbf fixup! nghttp2-based HTTP client with DoH support 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt bc3747f56b nghttp2-based HTTP client with DoH support 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt 7c01178369 netmgr/tls: call tls_do_bio in resumeread
We might have some leftover data in bio buffer that we received
before pausing, we need to do tls_do_bio to make sure we call
the recv() callback on it.
2020-08-31 11:12:41 -07:00
Evan Hunt 3b8e287994 fixup! netmgr/tls: logging 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt dbe5d42ff3 netmgr/tls: logging 2020-08-31 11:12:41 -07:00
Evan Hunt 469b7a5ecb fixup! isc_nm_cancelread returns true if the callback was called 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt ca3a5d1e52 isc_nm_cancelread returns true if the callback was called 2020-08-31 11:12:41 -07:00
Evan Hunt 2779c44e27 add "dig +tls"
- add isc_nm_tlsdnsconnect() function
- add "+[no]tls" option to dig to enable TLS mode
- override the default port number in dig from 53 to 853 when using TLS
2020-08-31 11:12:41 -07:00
Evan Hunt 3a09529d78 clean up some style nits 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt de0c3c3019 checkpoint/test: tcpdns always using TLS, to verify that dig can do DoT 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt f8ef33db6d post-merge-fixes 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt f43af328b6 tls connect: checkpoint 2020-08-31 11:12:41 -07:00
Witold KręcickiandEvan Hunt 1d32b9799e netmgr tcpdns: add support for DoT
Add an optional SSL_CTX argument to isc_nm_listentcpdns - if not NULL,
use isc_nm_listentls instead of isc_nm_listentcp to listen on a TLS
socket for DoT.
2020-08-31 10:58:37 -07:00
Witold KręcickiandEvan Hunt d7b441a1d5 netmgr: server-side TLS support
Add server-side TLS support to netmgr - that includes moving some of the isc_nm_
functions from tcp.c to a wrapper in netmgr.c calling a proper tcp or tls
function, and a new isc_nm_listentls function.
2020-08-31 10:58:37 -07:00
Evan Hunt 7aa9bbb8ac clear sock->statichandle if it goes to 0 references 2020-08-31 10:58:37 -07:00
Evan Hunt 4c8f28f087 experiment: add cancelread support for UDP, tweak lookup locking 2020-08-31 10:58:37 -07:00
Evan Hunt 1817dadf5d limit the time we wait for netmgr to be destroyed
if more than 10 seconds pass while we wait for netmgr
events to finish running on shutdown, something is almost
certainly wrong and we should assert and crash.
2020-08-31 10:58:37 -07:00
Evan Hunt 1cea2ede55 fixup! checkpoint: isc_nm_tcpdnsconnect 2020-08-31 10:58:37 -07:00
Evan Hunt 5316b99628 fixup! checkpoint: implement isc_nm_udpconnect() 2020-08-31 10:58:37 -07:00
Evan Hunt db354895e7 checkpoint: implement isc_nm_read() for UDP
isc_nm_read() on a UDP socket will now read a single datagram and
stop until next time.
2020-08-31 10:58:37 -07:00
Evan Hunt 03009e7159 checkpoint: implement isc_nm_udpconnect()
this function sets up a UDP socket, connected to a specified peer
address, then immediately calls a callback with a handle so that
the caller can begin sending.
2020-08-31 10:58:37 -07:00
Witold KręcickiandEvan Hunt cac6b52672 checkpoint: isc_nm_tcpdnsconnect
add a function to establish outgoing TCPDNS connections.
2020-08-31 10:58:37 -07:00
Witold KręcickiandEvan Hunt 9748d9f4d0 Rename isc_nmsocket_t->tcphandle to statichandle 2020-08-31 10:58:37 -07:00
Ondřej Surý e0380d437d Handle EPROTO errno from recvmsg
It was discovered, that some systems might set EPROTO instead of EACCESS
on recvmsg() call causing spurious syslog messages from the socket
code.  This commit returns soft handling of EPROTO errno code to the
socket code. [GL #1928]
2020-08-28 20:45:52 +02:00
Ondřej Surý 78543ad5a7 Fix off-by-one error when calculating new hashtable size
When calculating the new hashtable bitsize, there was an off-by-one
error that would allow the new bitsize to be larger than maximum allowed
causing assertion failure in the rehash() function.
2020-08-28 16:21:21 +02:00
Mark AndrewsandOndřej Surý 2ca4d35037 Refactor totext_loc 2020-08-26 15:31:31 +02:00
Mark AndrewsandOndřej Surý 337cc878fa Correctly encode LOC records with non integer negative altitudes. 2020-08-26 15:31:31 +02:00
Mark AndrewsandOndřej Surý 888dfd78c7 Check LOC's altitude field is properly parsed and encoded. 2020-08-26 15:31:31 +02:00
Mark AndrewsandOndřej Surý 9225c67835 Tighten LOC parsing to reject period and/or m as a value. 2020-08-26 15:31:31 +02:00
Ondřej SurýandMark Andrews 01684cc219 Use the Fibonacci Hashing for the RBTDB glue table
The rbtdb version glue_table has been refactored similarly to rbt.c hash
table, so it does use 32-bit hash function return values and apply
Fibonacci Hashing to lookup the index to the hash table instead of
modulo.  For more details, see the lib/dns/rbt.c commit log.
2020-08-26 21:16:04 +10:00
Mark Andrews 33d0e8d168 rbtversion->glue_table_size must be read when holding a lock 2020-08-26 21:16:04 +10:00
Mark AndrewsandOndřej Surý a347641782 Cast the original rcode to (dns_ttl_t) when setting extended rcode
Shifting (signed) integer left could trigger undefined behaviour when
the shifted value would overflow into the sign bit (e.g. 2048).

The issue was found when using AFL++ and UBSAN:

    message.c:2274:33: runtime error: left shift of 2048 by 20 places cannot be represented in type 'int'
    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior message.c:2274:33 in
2020-08-25 14:10:05 +00:00
Michal Nowak dd425254a7 Fix warnings in when build with --enable-buffer-useinline
sockaddr.c:147:49: error: pointer targets in passing argument 2 of ‘isc__buffer_putmem’ differ in signedness
    rdata.c:1780:30: error: pointer targets in passing argument 2 of ‘isc__buffer_putmem’ differ in signedness
2020-08-25 16:02:55 +02:00