Miek Gieben
67945c119e
A bunch of golint fixes
...
The proposed vars names are a nono, because they break the API.
Things left: document each RR and zscan_rr.go has some funcky if-then-elses.
2015-02-19 09:58:33 +00:00
Miek Gieben
477cb4d3fa
Implement IPSECKEY
...
IPSECKEY is kinda strange because it has a type selector which tells
what type a later rdata field has. The type can be a domainname, address
or v6 address. You sort of wish Go would have a union type for this, but
alas.
Currently this is implemented as:
GatewayA net.IP `dns:"a"`
GatewayAAAA net.IP `dns:"aaaa"`
GatewayName string `dns:"domain-name"`
In the IPSECKEY. Only one of these is active at any one time. When
parsing/packing and unpacking the value of GatewayType is checked
to see what to do.
Parsing from strings is also implemented properly and tested. The Unpack
function still needs work.
2015-01-25 10:58:30 +00:00
Miek Gieben
d33af8db79
Update test and gofmt
2014-11-09 16:09:49 +00:00
Miek Gieben
deb8fe381f
Cleanup the identical parsing functions.
...
Some records are copies from others: DNSKEY, CDNSKEY and KEY are
identical. DS, CDS and DLV are too and even RRSIG and SIG.
The parsing functions and the definition can all be used for parsing
all these identical types.
2014-11-02 11:29:55 +00:00
Andrew Tunnell-Jones
91b8c69a22
Implement SIG(0) signing and verification
...
This is based on @miekg's sig0 branch. That branch diverged from master
and I didn't want to wander off on a rebase.
As implemented there's no allowance for multi-envelope (TCP) support.
TODO:
* unpackUint32() could be moved out and used elsewhere
* tests
* multi-envelope support (if useful)
2014-11-01 11:32:46 +00:00
Miek Gieben
6bbae6c6ea
Add CDNSKEY support
2014-10-23 22:18:23 +01:00
Alex Sergeyev
efb2e66078
Added support for mnemonic names in CERT rr
...
This behavior matches what bind does with thir formatting.
2014-10-07 21:27:25 -04:00
Alex Sergeyev
75472702d9
LOC record trips slurp detector.
...
Reverted recent true->false change for it to mitigate that.
2014-10-07 20:47:55 -04:00
Alex Sergeyev
aaf867499e
Attempting to fix #133
...
- Trying to get as close to original state as possible
- Since private RR should not run slurp, toggling Variable there.
2014-09-23 21:59:09 -04:00
Miek Gieben
70556daa85
Dont export TypeToParserFunc
2014-09-16 07:20:40 +01:00
Miek Gieben
79861736a2
Factor the switch code in favor of TypeToParserFunc
2014-09-16 07:16:18 +01:00
Miek Gieben
17b0941344
Create and fill TypeToParserFunc
2014-09-16 07:15:34 +01:00
Miek Gieben
7962679920
Identical signature for all setXXX functions
2014-09-16 07:15:25 +01:00
Miek Gieben
e42e91096b
make all setTYPE parse function return the same values
2014-09-16 07:15:16 +01:00
Miek Gieben
0aa3021a83
Remove all copyright notices
...
Use the central COPYRIGHT file.
2014-09-11 20:57:37 +01:00
Miek Gieben
5fd5c6d9eb
And actually fix the parsing
2014-08-30 08:44:16 +01:00
Miek Gieben
cbb9881e96
Parse dynamic update RR in presentation format
...
Don't panic when encountering dynamic update RRs in zonefiles.
There are some other failure cases when parsing, those will be
fixed in subsequent commits.
Closes #110
2014-08-30 07:34:05 +01:00
Miek Gieben
f6c7c65fc4
Merge branch 'master' of github.com:miekg/dns
2014-08-29 09:42:53 +00:00
Miek Gieben
cfa561ed85
Add TestDynamicUpdateParsing test
2014-08-29 09:42:43 +00:00
Alex Sergeyev
05bec3968a
Addressed cases when tokenUpper makes sense to be used.
2014-08-28 13:34:00 -04:00
Alex Sergeyev
9c4dca35d5
Removed unnecessary toUpper.
2014-08-28 12:59:54 -04:00
Miek Gieben
4d3dac9c36
Add the OPENPGPKEY RR.
2014-08-14 09:18:08 +01:00
Miek Gieben
ef732d1050
RRSIGs: parse epoch timestamp too
...
According to RFC4034 the timestamp in RRSIG may also be an EPOCH.
Check for this when parsing. Knot DNS zone dumps contain timestamp
RRSIG, this makes those parseable by Go DNS.
2014-01-11 08:50:10 +00:00
Miek Gieben
c174304212
Add test for RRSIG with timestamp in epoch
...
This is standard's compliant but currently not supported.
2014-01-11 08:37:34 +00:00
Miek Gieben
f3af5834c2
Also add empty txt record in another test
2014-01-11 08:12:13 +00:00
Andrew Tunnell-Jones
549ed97be1
Fix parsing of TXT records containing empty-strings
2014-01-11 05:33:23 +00:00
Miek Gieben
110f6c9ea7
Test for TYPE65534 records, copy now copies slices correctly
2013-12-06 07:37:48 +00:00
Miek Gieben
ff7806469c
Implement EID and NIMLOC records
2013-10-19 21:31:12 +01:00
Miek Gieben
b435d836c6
gofmt
2013-10-15 14:21:47 +00:00
Miek Gieben
35bcc78d76
Implement PX record
2013-10-13 13:23:02 +01:00
Miek Gieben
cc2c42cc91
Implement GPOS record
2013-10-13 13:01:33 +01:00
Miek Gieben
961e137891
Add NSAP and NSAP-PTR record
2013-10-13 12:25:08 +01:00
Tonnerre LOMBARD
dc79aa0c5a
Fix for typo in message in zscan_rr:
...
Adress is spelled with an insufficient number of ds.
2013-09-15 03:55:10 +02:00
Miek Gieben
47cc5b052d
Work on making IsDomainName better
2013-09-10 13:13:10 +00:00
Miek Gieben
5d094e6e2d
gofmt
2013-06-14 19:42:55 +01:00
Miek Gieben
d017b24161
parsing known records as unknown ones, does not work
2013-06-07 08:14:14 +01:00
Miek Gieben
6f0ce553cf
Acutally use the CERT parsing
...
Also fix some bugs in the errors it sends back
2013-06-05 22:28:13 +01:00
Miek Gieben
fd17416ab0
Fix parsing MINFO
2013-06-05 22:20:36 +01:00
Miek Gieben
b33fb29f34
Actually add the MINFO parsing
2013-06-05 22:16:55 +01:00
Miek Gieben
c66494c6c5
Resolv merge conflicts
2013-05-12 19:08:37 +02:00
Miek Gieben
81941d4422
Update all copyright notices
2013-05-12 16:15:52 +02:00
Miek Gieben
495b7d6552
Add UID/GID/UINFO record
2013-04-30 16:42:04 +02:00
Miek Gieben
f43b7368bd
Add tests for EUIxx
2013-04-16 08:41:35 +01:00
Miek Gieben
740ad9674c
Allow EUI48 and EUI46 to be parsed
2013-04-16 08:41:35 +01:00
Miek Gieben
4c7a8b4985
Add EUI48 (108) and EUI64 (109)
...
This is an implementation of
http://tools.ietf.org/html/draft-jabley-dnsext-eui48-eui64-rrtypes-02
2013-04-16 08:40:24 +01:00
Miek Gieben
ffca5f59b1
Make comments normative
...
Fixup the last RR and create a unit test
2013-03-04 15:40:22 +01:00
Miek Gieben
1807dfe2b0
NSEC3PARAM parsing needs slurp
2013-03-04 15:26:58 +01:00
Miek Gieben
7b7eaaa4b0
Make (some) commments normative in zonefiles
2013-03-04 12:16:20 +01:00
Miek Gieben
525465db6d
Add parse test and further tweaks
2013-03-04 11:24:08 +01:00
Miek Gieben
ecaf48ed4b
Fix URI target parsing
2013-01-20 18:26:10 +01:00