Commit Graph

692 Commits

Author SHA1 Message Date
Viktor Dukhovni
e1f8de7f59 Fix FlagOp Semigroup definition 2018-10-12 01:02:23 -04:00
Kazu Yamamoto
1bf1582f37 changelog. 2018-10-11 14:32:33 +09:00
Kazu Yamamoto
036b5c105b Merge PR #117. 2018-10-10 18:52:38 +09:00
Viktor Dukhovni
d6562346f1 Fix typo RD -> CD 2018-10-10 04:56:43 -04:00
Viktor Dukhovni
29b250bd03 A bit more documentation upkeep 2018-10-10 04:39:27 -04:00
Kazu Yamamoto
e9c87b67a3 Merge PR #116. 2018-10-10 17:07:28 +09:00
Kazu Yamamoto
059d13b885 brushing up docs. 2018-10-10 17:03:09 +09:00
Kazu Yamamoto
c7c7fc08cb defining lookupRawWithFlags. 2018-10-10 13:49:53 +09:00
Kazu Yamamoto
179ae854fa using filter. 2018-10-10 13:14:23 +09:00
Kazu Yamamoto
25a0feca79 brushing up doctest. 2018-10-10 12:35:55 +09:00
Kazu Yamamoto
e75066a90a updating doc. 2018-10-10 12:35:40 +09:00
Kazu Yamamoto
4c3177ac70 renaming and brushing up doctest. 2018-10-10 12:31:23 +09:00
Kazu Yamamoto
804a711d44 doc and doctest for FlagOp. 2018-10-10 10:56:45 +09:00
Kazu Yamamoto
d6f7b2f96e fixing the import style. 2018-10-09 15:18:56 +09:00
Kazu Yamamoto
2788bd8759 introducing FlagOp. 2018-10-09 15:15:39 +09:00
Kazu Yamamoto
3dea15e994 breaking chang: removing the prime functions. 2018-10-09 14:03:28 +09:00
Kazu Yamamoto
63c45f59f6 accepting hlint suggestions. 2018-10-09 13:50:16 +09:00
Kazu Yamamoto
a7ad2b5fad removing a warning. 2018-10-09 13:44:56 +09:00
Viktor Dukhovni
be7725c7b1 Some documentation polish 2018-10-06 04:12:56 -04:00
Viktor Dukhovni
8e080c3fbe Make use of the RD and CD bits configurable
This can be done at the resolver level by specifying a set of overrides
via the new 'resolvQueryFlags' field.  This makes it possible to request
unvalidated data from validating DNSSEC resolvers (by setting the CD bit)
or to query authoritative servers (by clearing the RD bit, since many
authoritative servers will refuse queries with the RD bit set, even
when authoritative for the query domain).

Alternatively, the new "lookupRaw'" function takes a similar
"QueryFlags" parameter which is combined with overrides from the
resolver configuration.  The set of overrides forms a Monoid generated
by the 'rdBit', 'adBit' and 'cdBit' combinators.  Each combinator
can request that a given bit "set", "cleared" or "reset" (to its
default).  The "queryDNSFlags" function produces the final "DNSFlags"
record after applying the requested overrides.

With these changes one can configure per-resolver defaults for the
RD/AD/CD bits, or else choose settings on the fly for each lookup
with "lookupRaw'".  (This makes "lookupRawAD" somewhat obsolete,
we might deprecate it at some point in the future, but probably
best to leave it be, it is simpler if one just wants the AD bit).
2018-10-06 04:12:56 -04:00
Kazu Yamamoto
dcab3ce960 Merge PR #113. 2018-06-25 09:27:35 +09:00
Matthew Chan
c4b6625c43
fix tests and encoder 2018-06-21 16:24:49 -07:00
Matthew Chan
6cd75d1e0d
remove OP_3_UNASSIGNED, add conversion functions 2018-06-21 13:49:15 -07:00
Matthew Chan
163478a716
add opcodes 2018-06-21 13:22:33 -07:00
Kazu Yamamoto
af5367ccaa ver bumps up. 2018-05-21 14:20:11 +09:00
Kazu Yamamoto
118a2d8521 changelog. 2018-05-21 14:19:57 +09:00
Kazu Yamamoto
fe501b6d71 Merge PR #112. 2018-05-21 14:18:20 +09:00
Viktor Dukhovni
d83510837e Drop unexpected UDP answers
Occassionally, when a client gives on a query and closes its UDP
socket, the nameserver nevertheless eventually replies.  When that
happens, the UDP socket in question may now be in use for a different
query.  When the unexpected stale answer arrives, we should just
drop it, and continue waiting for the right answer.  Otherwise, we
may end up with spurious sequence number mismatch errors (observed
in practice under heavy load, with thousands of DNS queries per
second).

We check both the sequence number and the question.  For this the
question domain needs to be in standard form, with a trailing '.'.
We might have checked the question class, but questions are at
present implicitly in class "IN".  Sprinkled in some comments in
case that ever changes.

Turned the question into a singleton list early, simplifying
downsream code.
2018-05-15 00:11:28 -04:00
Kazu Yamamoto
78d3c1414b ver bumps up. 2018-05-15 10:00:57 +09:00
Kazu Yamamoto
7d622f5cba Merge PR #111. 2018-05-15 09:54:04 +09:00
Kazu Yamamoto
9afb9634f7 improving an error message. 2018-05-14 15:09:06 +09:00
Kazu Yamamoto
ad62f24779 refactoring. 2018-05-14 10:39:00 +09:00
Kazu Yamamoto
72a579d8eb using the logical limit for pointers. 2018-05-14 10:25:48 +09:00
Kazu Yamamoto
6e52f4d7f4 checking offset limit. 2018-05-14 10:19:42 +09:00
Kazu Yamamoto
ee78f364d9 defining maxUdpSize and minUdpSize. 2018-05-08 14:18:56 +09:00
Kazu Yamamoto
fbf2b9b210 using the pointer stack. 2018-05-07 17:06:39 +09:00
Kazu Yamamoto
424552e7a0 style change. 2018-05-07 17:00:12 +09:00
Kazu Yamamoto
c27ef78201 detecting pointer loop in getDomain'. 2018-05-07 16:52:27 +09:00
Kazu Yamamoto
faeb64a2fa using the same separator. 2018-05-07 16:40:07 +09:00
Kazu Yamamoto
d8805dd524 refactoring. 2018-04-17 13:31:50 +09:00
Kazu Yamamoto
d86f51022e using loop for TCP recv. 2018-04-17 13:18:49 +09:00
Kazu Yamamoto
de68558f59 fixing error handling. 2018-04-16 17:13:50 +09:00
Kazu Yamamoto
3074b497bd defining DecodeError. 2018-04-16 17:09:03 +09:00
Kazu Yamamoto
040f722143 layout only. 2018-04-16 13:03:34 +09:00
Kazu Yamamoto
df0f3a0877 holding the original data in decoder state. (#103) 2018-04-16 11:35:04 +09:00
Kazu Yamamoto
160a876174 stop using Conduit. 2018-04-16 11:31:36 +09:00
Kazu Yamamoto
1bd3b07a96 adding test for send/receive. 2018-04-16 11:17:05 +09:00
Kazu Yamamoto
18ebc30692 stop using pattern synonym for GHC 8.0.
haddock of GHC 8.0 is buggy.
2018-04-16 11:08:25 +09:00
Kazu Yamamoto
dcf7e30871 fixing SimpleServer. 2018-04-13 17:28:48 +09:00
Kazu Yamamoto
e819158571 Merge PR #109. 2018-04-10 15:54:01 +09:00