summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-01-31 16:23:00 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-02-12 20:00:42 -0500
commitfa45182ed6b833017dde5a7cee27cdf25985790a (patch)
treebf6476befb583a3ebbff5d15a33a981b78f5370c
parentfff85dbe15475c35fed2af66fabef3bdfb94f389 (diff)
Fix hashing of TLSA packets
Also add example files with TLSA and SSHFP records.
-rw-r--r--Makefile.am4
-rw-r--r--src/resolve/resolved-dns-rr.c2
-rw-r--r--src/resolve/test-data/_443._tcp.fedoraproject.org.pktsbin0 -> 169 bytes
-rw-r--r--src/resolve/test-data/kyhwana.org.pktsbin0 -> 1803 bytes
4 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 754772156c..8ab04e74ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5324,7 +5324,9 @@ EXTRA_DIST += \
src/resolve/test-data/root.pkts \
src/resolve/test-data/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts \
src/resolve/test-data/teamits.com.pkts \
- src/resolve/test-data/zbyszek@fedoraproject.org.pkts
+ src/resolve/test-data/zbyszek@fedoraproject.org.pkts \
+ src/resolve/test-data/_443._tcp.fedoraproject.org.pkts \
+ src/resolve/test-data/kyhwana.org.pkts
test_dnssec_SOURCES = \
src/resolve/test-dnssec.c \
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 2803ec017e..422bbe4bc4 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -1429,7 +1429,7 @@ void dns_resource_record_hash_func(const void *i, struct siphash *state) {
siphash24_compress(&rr->tlsa.cert_usage, sizeof(rr->tlsa.cert_usage), state);
siphash24_compress(&rr->tlsa.selector, sizeof(rr->tlsa.selector), state);
siphash24_compress(&rr->tlsa.matching_type, sizeof(rr->tlsa.matching_type), state);
- siphash24_compress(&rr->tlsa.data, rr->tlsa.data_size, state);
+ siphash24_compress(rr->tlsa.data, rr->tlsa.data_size, state);
break;
case DNS_TYPE_OPENPGPKEY:
diff --git a/src/resolve/test-data/_443._tcp.fedoraproject.org.pkts b/src/resolve/test-data/_443._tcp.fedoraproject.org.pkts
new file mode 100644
index 0000000000..a383c6286d
--- /dev/null
+++ b/src/resolve/test-data/_443._tcp.fedoraproject.org.pkts
Binary files differ
diff --git a/src/resolve/test-data/kyhwana.org.pkts b/src/resolve/test-data/kyhwana.org.pkts
new file mode 100644
index 0000000000..e28a725c9a
--- /dev/null
+++ b/src/resolve/test-data/kyhwana.org.pkts
Binary files differ