Willem Toorop
554f015931
Deschedule idle_timeouts on context destroy
2015-07-14 10:44:15 +02:00
Willem Toorop
a8adf662d1
Fix memory leak setting transports
2015-07-13 16:39:43 +02:00
Willem Toorop
5c61954427
Fix geting recursive_upstream_servers
2015-07-13 16:22:39 +02:00
Willem Toorop
431415bd3d
rm debugging fprintf leftover
2015-07-10 10:18:00 +02:00
Willem Toorop
2884abe870
Allow alternative trust anchors + ...
...
Switch freely between stub and recursive resolving
2015-07-10 00:05:26 +02:00
Willem Toorop
4135f633ac
Fix invalid memory reads
2015-07-09 15:40:00 +02:00
Willem Toorop
f066d5ef73
Merge branch 'features/native-stub-dnssec' into develop
...
Conflicts:
configure.ac
src/stub.c
2015-07-02 10:27:27 +02:00
Willem Toorop
41cf772fb3
Trust anchors in wireformat in context
2015-06-30 14:43:52 +02:00
Willem Toorop
8d5ac3afde
Store dnsreq->name in wire format
2015-06-29 23:32:49 +02:00
Sara Dickinson
e20d679bc8
Improve TCP close handling and sync connection closing
2015-06-29 09:09:13 +01:00
Willem Toorop
0411668cb4
blah
2015-06-26 11:39:44 +02:00
Willem Toorop
fe4b7095b3
Set has_ta before unbound context initialization
2015-06-26 00:29:20 +02:00
Sara Dickinson
cb5bbac26d
Do better with unbound transport mapping and fix problems with sync fallback
2015-06-25 20:21:00 +01:00
Sara Dickinson
8819d29535
Implement TCP fallback and hack for lack of sync idle timeout.
2015-06-24 18:49:34 +01:00
Willem Toorop
1babc715b7
Init context->dnssec_trust_anchors with default
2015-06-23 16:40:47 +02:00
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
97f0dddb1e
remove ldns dependency from rr-dict.c
...
Only dnssec.c left
2015-06-12 13:51:36 +02: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
Willem Toorop
b62e2bb84c
Prepare datastructs for tcp stub resolving
2014-10-16 11:28:32 +02:00
Willem Toorop
ee316741ac
Async stub resolver using crafted packets
2014-10-15 15:12:16 +02:00
Willem Toorop
8f254913f1
Sync functions use the async _loop functions too
...
So async and sync functions now have the same code path
2014-10-15 12:16:34 +02:00
Willem Toorop
a1be0c985d
Miscelaneous fixes that came out of the unit tests
...
TODO: libuv still has issues. Do we really need a close callback?
2014-10-15 01:13:39 +02:00
Willem Toorop
768d8fbf4d
_loop version for async funcs
...
So they can be used by the sync functions with a libmini_event loop
2014-10-14 00:14:25 +02:00
Willem Toorop
f61d2ae262
write and run methods for eventloop extension
2014-10-10 14:48:52 +02:00
Willem Toorop
b3b634a2f5
libevent & libev following new extension scheme
2014-10-09 01:18:53 +02:00
Willem Toorop
1f203485e2
eventloop separate from context & libmini_event
2014-10-08 15:42:33 +02:00
Willem Toorop
a21895d145
Fix timeout handling & simultaneous 4 & 6 requests
...
Simultaneous 4 & 6 requests for async only.
Also get rid of the postponing of callbacks hack.
2014-10-07 15:52:41 +02:00
Willem Toorop
5fc9675397
libunbound requests processing with mini_event
2014-10-06 23:50:39 +02:00
Willem Toorop
54e0b42dcd
Timeouts via default mini_event extension
2014-10-06 23:04:12 +02:00
Willem Toorop
58b3e553de
Remove redundant param from schedule_timeout funcs
2014-10-06 20:23:50 +02:00
Willem Toorop
648153f98c
Timeouts are 64 bits
2014-10-06 16:10:09 +02:00
Willem Toorop
68520e91d4
Return empty reponse on timeouts with async too
2014-10-06 15:11:03 +02:00
Willem Toorop
332f34b3f5
set_upstream_recursive_servers small bugfixes
2014-10-02 00:16:11 +02:00
Willem Toorop
2dcdfaba37
getdns_context_set_upstream_recursive_servers
2014-10-01 23:16:43 +02:00
Willem Toorop
3742edaf07
Get rid of the address_string attribute
...
Not in the spec, and had internal usage only (but not anymore)
2014-10-01 13:08:36 +02:00
Willem Toorop
1c6ce72f74
Parse /etc/resolv.conf ourselves
...
At the ame time IPv6 local-link scope_id support
2014-09-30 15:12:48 +02:00
saradickinson
d9addba883
Second pass at implementing per query namespaces!
2014-09-25 15:59:05 +00:00
saradickinson
050506341c
First pass of implementing per query namespace lookup for stub resolver. Also a getdns local namespace lookup is now used for all sync calls.
2014-09-25 14:49:18 +00:00
Willem Toorop
ea4ee27612
Merge branch 'master' into features/gldns
2014-09-24 23:16:46 +02:00
saradickinson
8766f135df
More housekeeping
2014-09-17 18:47:04 +00:00
saradickinson
46748c9a0c
Housekeeping of ldns res. Fix transport test.
2014-09-17 18:24:07 +00:00
saradickinson
5a765ad632
Fix typo
2014-09-16 11:25:18 +00:00
saradickinson
cbfea31081
Add extra check in test_stub_sync for TCP messages
2014-09-13 17:07:07 +00:00
saradickinson
f89acb6e2d
Setting up nameservers correctly for ldns as stub
2014-09-13 16:19:25 +00:00
Sara Dickinson
f59689cf68
Use ldns as stub resolover for sync queries part 1
2014-09-12 14:15:46 +00:00
Willem Toorop
c690e3907e
Set correct unbound option for edns payload size
2014-09-12 10:09:08 +02:00
Willem Toorop
3b9c1270c2
[API 0.505] "resolver_type" now "resolution_type"
...
Renamed in the response from getdns_context_get_api_information()
2014-09-03 15:42:11 +02:00
Willem Toorop
ffe4d3d295
More missing colons in unbound options
2014-08-19 16:38:59 +02:00
Willem Toorop
eac1647fba
Need a colon here too
2014-08-19 16:31:13 +02:00
John Dickinson
51d04447ea
Fix for issue 54: set_ub_dns_transport() not working
2014-08-10 14:59:03 +00:00
Willem Toorop
26faaa67c1
Fix building docs for blddir != srcdir
2014-05-21 16:21:45 +02:00
Willem Toorop
57b51a5dcc
prefer includes local to builddir
2014-05-19 15:50:34 +02:00