summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2007-10-11 18:36:42 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2007-10-11 18:36:42 +0000
commit775044fa393742aee6a9a9752c013a116f4a94c1 (patch)
tree264aec140b6e7974b9e45ff6dc9d47f963e48e83 /lib
parentc8d027b7c2c9478cc6134a64ce7f4493c4f31d03 (diff)
use RRSIG instead of SIG for DNSSEC. ok djm@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/gethostnamadr.c4
-rw-r--r--lib/libc/net/getrrsetbyname.c6
-rw-r--r--lib/libc/net/res_debug.c3
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c
index 66d7e5ccd40..d49b9cdd7d7 100644
--- a/lib/libc/net/gethostnamadr.c
+++ b/lib/libc/net/gethostnamadr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gethostnamadr.c,v 1.71 2007/05/16 04:14:23 ray Exp $ */
+/* $OpenBSD: gethostnamadr.c,v 1.72 2007/10/11 18:36:41 jakob Exp $ */
/*-
* Copyright (c) 1985, 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -238,7 +238,7 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype)
cp += INT16SZ; /* len */
if (cp >= eom)
break;
- if (type == T_SIG) {
+ if (type == T_SIG || type == T_RRSIG) {
/* XXX - ignore signatures as we don't use them yet */
cp += n;
continue;
diff --git a/lib/libc/net/getrrsetbyname.c b/lib/libc/net/getrrsetbyname.c
index e679eb5d963..89aa592ba04 100644
--- a/lib/libc/net/getrrsetbyname.c
+++ b/lib/libc/net/getrrsetbyname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getrrsetbyname.c,v 1.10 2005/03/30 02:58:28 tedu Exp $ */
+/* $OpenBSD: getrrsetbyname.c,v 1.11 2007/10/11 18:36:41 jakob Exp $ */
/*
* Copyright (c) 2001 Jakob Schlyter. All rights reserved.
@@ -196,7 +196,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass,
rrset->rri_rdtype);
rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass,
- T_SIG);
+ T_RRSIG);
/* allocate memory for answers */
rrset->rri_rdatas = calloc(rrset->rri_nrdatas,
@@ -224,7 +224,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
rdata = &rrset->rri_rdatas[index_ans++];
if (rr->class == rrset->rri_rdclass &&
- rr->type == T_SIG)
+ rr->type == T_RRSIG)
rdata = &rrset->rri_sigs[index_sig++];
if (rdata) {
diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c
index 8e72c2a5e5b..246fefef3c4 100644
--- a/lib/libc/net/res_debug.c
+++ b/lib/libc/net/res_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_debug.c,v 1.21 2005/08/06 20:30:04 espie Exp $ */
+/* $OpenBSD: res_debug.c,v 1.22 2007/10/11 18:36:41 jakob Exp $ */
/*
* ++Copyright++ 1985, 1990, 1993
@@ -751,6 +751,7 @@ __p_rr(const u_char *cp, const u_char *msg, FILE *file)
break;
case T_SIG:
+ case T_RRSIG:
type = _getshort((u_char*)cp);
cp += INT16SZ;
fprintf(file, " %s", p_type(type));