Commit Graph

158 Commits

Author SHA1 Message Date
Sara Dickinson 67e282edd1 More work on transport/upstream fallback. TLS and UDP fallback not working yet.... Probably need to maintain a current upstream for each transport to get this working properly 2015-06-22 18:02:28 +01:00
Sara Dickinson b73b5b2792 Fix some bugs... 2015-06-21 16:55:12 +01:00
Sara Dickinson 635cf9e182 Re-factor of internal handing of transport list. 2015-06-19 18:28:29 +01:00
Sara Dickinson 0acdcc34b0 Changelog, idle_timeout test, formatting 2015-06-18 17:29:23 +01:00
Sara Dickinson 68dfb15706 Add context idle timeout 2015-06-18 17:11:11 +01:00
Sara Dickinson 8dd8d90e74 Commit addition of transport list to the API.
- set and get functions are added.
- Existing transport functions retained for backwards compatibility.
- Basic combinations work as before, but underlying functional changes and cleanup are not complete yet...
- Context level options for timeouts and max_transactions_per_tcp_connection coming soon...
2015-06-17 17:18:09 +01:00
Willem Toorop 011b504496 Fix misplaced freeaddrinfo 2015-05-13 12:39:24 +02:00
saradickinson 3ac5e660f9 Address few minor bugs pointed out by willem 2015-05-11 22:01:31 +02:00
Sara Dickinson 9d967317d3 Improve the timeout handling for TLS. 2015-05-03 15:11:46 +01:00
Sara Dickinson 01adce8299 Organise code in stub.c and add some utility methods. 2015-05-02 18:08:45 +01:00
Sara Dickinson d6d83b219d Make sure UDP only uses 1 upstream per IP address. Fix a couple of other bugs. 2015-04-30 19:07:49 +01:00
Sara Dickinson 450a3bc6ff Fix STARTTLS fallback. 2015-04-30 14:52:16 +01:00
Sara Dickinson 7905eda8b7 Some clean up of connection handling. Still a problem with STARTTLS fallback that needs fixing. 2015-04-30 12:24:13 +01:00
Sara Dickinson 79b3412fbf Add another transport option as proof of concept for STARTTLS. 2015-04-29 19:20:25 +01:00
Sara Dickinson b533bc59c5 Fix bug when fallback not available 2015-04-27 16:37:16 +01:00
Sara Dickinson 4e6e66fc77 Get sync messages working with new async code. 2015-04-27 15:32:57 +01:00
Sara Dickinson 3de15ad782 Change internal transport handling to use a list, not a fixed type 2015-04-24 16:29:08 +01:00
Sara Dickinson f2ae55858f First pass at making handshake async. Lots of issues with this code still
- timeouts are not being rescheduled on fallback
- several error cases are not being handled correctly (e.g. 8.8.8.8) and a user callback is not always called
- the fallback mechanism is not generic (specific to tls to tcp)
2015-04-23 17:46:31 +01:00
Willem Toorop 0ba6af3523 upstreams_cleanup from upstreams_dereference 2015-04-18 22:17:28 +02:00
Sara Dickinson 6c7ffc4e4e 1) Fix enum mapping error.
2) Also add detection of TLS 1.2 in openssl during configure and warn that it if not available then TLS will not be available. Using TLS_ONLY in stub mode will then error with BAD_CONTEXT. TLS/TCP will fallback to TCP.

3) Explicitly disallow use of TLS_ONLY in RECURSIVE mode since it isn't supported yet. TLS/TCP will fallback to TCP.

4) Fix for MAC OS X build where openssl not linked correctly
2015-04-17 18:38:13 +01:00
Sara Dickinson ab4fb8d9e9 Enable GETDNS_TRANSPORT_TLS_ONLY_KEEP_CONNECTIONS_OPEN for libunbound. Should only be used in stub mode.
GETDNS_TRANSPORT_TLS_FIRST_AND_FALL_BACK_TO_TCP_KEEP_CONNECTIONS_OPEN still just does TCP.
Also some tidy up of new transport types.
2015-04-17 15:50:08 +01:00
Sara Dickinson 99c1973fae Cleanup of TLS code 2015-04-16 18:05:51 +01:00
saradickinson 99aa79b48f First pass at TLS implementation - needs work! 2015-04-16 18:05:27 +01:00
Willem Toorop 87eb9307a7 A getter for context update callbacks 2015-04-02 22:01:30 +02:00
Willem Toorop 56bb9dbbdc Pass along a userarg with context update callbacks 2015-04-02 14:42:26 +02:00
Willem Toorop 00f047816d EDNS cookies processing as stub 2015-03-22 10:50:48 -05:00
Willem Toorop c02f895358 Miscelaneous cleanups
as a consequence of ldns elemination with local-hosts
2015-03-12 22:41:39 +01:00
Willem Toorop 90ae4bf62c local-hosts handling without ldns 2015-03-12 21:37:03 +01:00
Willem Toorop 3f046cf573 Embed netreqs in dns_reqs and wire_data in netreqs
TODO: make sure the wire_data buffer is filled with the response
2015-01-29 12:30:40 +01:00
Willem Toorop 736f5ff157 No executable flags on source files
Thanks Paul Wouters
2015-01-20 12:16:49 +01:00
Neel Goyal 310a7e330e Adding getters 2014-12-06 23:46:44 -05:00
Willem Toorop 114e459a43 Make things work on FreeBSD again 2014-10-31 14:17:30 +01:00
Willem Toorop 0daa5b573d Allow to set empty bindata's
quite common in OPT record's rdata_raw
2014-10-30 15:08:42 +01:00
Willem Toorop 522a23d864 Get rid of context_fd
recursive mode only
2014-10-28 15:39:48 +01:00
Willem Toorop 829c459823 Horrific typo! Please don't look. 2014-10-28 14:36:41 +01:00
Willem Toorop d92dc8b460 edns_do_bit defaults to 0 with stub
And better handling of including OPT RR in stub query
2014-10-28 14:32:29 +01:00
Willem Toorop f9195fde4d getdns_context_set_follow_redirects not changed
Error in previous commit.
Nothing changed with getdns_context_set_follow_redirects.
It is simply not implemented
2014-10-28 14:27:30 +01:00
Willem Toorop 4740d0baf4 context setters that can be called after create
getdns_context_set_namespaces and getdns_context_set_upstream_recursive_servers
can also be called after context create now.
2014-10-28 14:23:40 +01:00
Willem Toorop 4c8a179e87 issue #76 Setting payload < 512 should not error
Thanks gmadkat
2014-10-27 14:18:31 +01:00
Willem Toorop 2be047d48d declare inline functions in a more portable way
Or at least in a way that works without a -O[1-3] flag...
2014-10-24 23:20:28 +02:00
Willem Toorop cd500f055b memory leak fixes (found with valgrind) 2014-10-23 23:55:52 +02:00
Willem Toorop 73dc0f27da fix: local_hosts set keys and shallow free returns 2014-10-23 23:25:55 +02:00
Willem Toorop 4a3d7fd8b2 Replace ldns_rbtree with getdns_rbtree
As much as possible.
In dnssec ldns_rbtree is inderectly used via the dnssec_zone struct

This change forces use to embed the data in the nodes as getdns_rbtree does not have a data attribute. This is good because lesser allocs and free's and thus slightly faster and less likely to leak memory.
2014-10-23 23:00:30 +02:00
Willem Toorop 55e0d41d4b fix: Don't init suffix with uninitialized domain 2014-10-23 15:32:35 +02:00
Willem Toorop 6f6b8e65a2 Stub edns0 payload 1232 for IPv6 and 1432 for IPv4 2014-10-23 14:30:23 +02:00
Willem Toorop 484f98daf9 remove ldns_res from context 2014-10-23 14:14:55 +02:00
Willem Toorop fc6e583b4b Stub TCP pipelining
TODO: Resolve issue with timeouts in async pipelining mode.
2014-10-18 14:32:55 +02:00
Willem Toorop 181d8cd3f4 stub tcp lookups
And the foundation for tcp keep connections open
2014-10-18 00:25:41 +02:00
Willem Toorop c017e75f5a don't try stubs without upstreams 2014-10-16 14:40:47 +02:00
Willem Toorop 623c9b04a5 Retry stub with different upstream after timeout
Backing off the broken upsteams so they are tried again (increasingly less)
2014-10-16 14:24:13 +02:00