summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakob <>2007-10-11 18:36:41 +0000
committerjakob <>2007-10-11 18:36:41 +0000
commit115b8b7d4830ff4c5f4180f7d64cd57307f5f909 (patch)
tree462aa016167755635ce692cc1a4ed1c5f78e35d2
parentbd1e03a2e6753a3548e4e72197b9ca31041d113a (diff)
downloadopenbsd-115b8b7d4830ff4c5f4180f7d64cd57307f5f909.tar.gz
openbsd-115b8b7d4830ff4c5f4180f7d64cd57307f5f909.tar.bz2
openbsd-115b8b7d4830ff4c5f4180f7d64cd57307f5f909.zip
use RRSIG instead of SIG for DNSSEC. ok djm@
-rw-r--r--src/lib/libc/net/gethostnamadr.c4
-rw-r--r--src/lib/libc/net/getrrsetbyname.c6
-rw-r--r--src/lib/libc/net/res_debug.c3
3 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c
index 66d7e5ccd4..d49b9cdd7d 100644
--- a/src/lib/libc/net/gethostnamadr.c
+++ b/src/lib/libc/net/gethostnamadr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gethostnamadr.c,v 1.71 2007/05/16 04:14:23 ray Exp $ */ 1/* $OpenBSD: gethostnamadr.c,v 1.72 2007/10/11 18:36:41 jakob Exp $ */
2/*- 2/*-
3 * Copyright (c) 1985, 1988, 1993 3 * Copyright (c) 1985, 1988, 1993
4 * The Regents of the University of California. All rights reserved. 4 * 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)
238 cp += INT16SZ; /* len */ 238 cp += INT16SZ; /* len */
239 if (cp >= eom) 239 if (cp >= eom)
240 break; 240 break;
241 if (type == T_SIG) { 241 if (type == T_SIG || type == T_RRSIG) {
242 /* XXX - ignore signatures as we don't use them yet */ 242 /* XXX - ignore signatures as we don't use them yet */
243 cp += n; 243 cp += n;
244 continue; 244 continue;
diff --git a/src/lib/libc/net/getrrsetbyname.c b/src/lib/libc/net/getrrsetbyname.c
index e679eb5d96..89aa592ba0 100644
--- a/src/lib/libc/net/getrrsetbyname.c
+++ b/src/lib/libc/net/getrrsetbyname.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getrrsetbyname.c,v 1.10 2005/03/30 02:58:28 tedu Exp $ */ 1/* $OpenBSD: getrrsetbyname.c,v 1.11 2007/10/11 18:36:41 jakob Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Jakob Schlyter. All rights reserved. 4 * Copyright (c) 2001 Jakob Schlyter. All rights reserved.
@@ -196,7 +196,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
196 rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass, 196 rrset->rri_nrdatas = count_dns_rr(response->answer, rrset->rri_rdclass,
197 rrset->rri_rdtype); 197 rrset->rri_rdtype);
198 rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass, 198 rrset->rri_nsigs = count_dns_rr(response->answer, rrset->rri_rdclass,
199 T_SIG); 199 T_RRSIG);
200 200
201 /* allocate memory for answers */ 201 /* allocate memory for answers */
202 rrset->rri_rdatas = calloc(rrset->rri_nrdatas, 202 rrset->rri_rdatas = calloc(rrset->rri_nrdatas,
@@ -224,7 +224,7 @@ getrrsetbyname(const char *hostname, unsigned int rdclass,
224 rdata = &rrset->rri_rdatas[index_ans++]; 224 rdata = &rrset->rri_rdatas[index_ans++];
225 225
226 if (rr->class == rrset->rri_rdclass && 226 if (rr->class == rrset->rri_rdclass &&
227 rr->type == T_SIG) 227 rr->type == T_RRSIG)
228 rdata = &rrset->rri_sigs[index_sig++]; 228 rdata = &rrset->rri_sigs[index_sig++];
229 229
230 if (rdata) { 230 if (rdata) {
diff --git a/src/lib/libc/net/res_debug.c b/src/lib/libc/net/res_debug.c
index 8e72c2a5e5..246fefef3c 100644
--- a/src/lib/libc/net/res_debug.c
+++ b/src/lib/libc/net/res_debug.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_debug.c,v 1.21 2005/08/06 20:30:04 espie Exp $ */ 1/* $OpenBSD: res_debug.c,v 1.22 2007/10/11 18:36:41 jakob Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1990, 1993 4 * ++Copyright++ 1985, 1990, 1993
@@ -751,6 +751,7 @@ __p_rr(const u_char *cp, const u_char *msg, FILE *file)
751 break; 751 break;
752 752
753 case T_SIG: 753 case T_SIG:
754 case T_RRSIG:
754 type = _getshort((u_char*)cp); 755 type = _getshort((u_char*)cp);
755 cp += INT16SZ; 756 cp += INT16SZ;
756 fprintf(file, " %s", p_type(type)); 757 fprintf(file, " %s", p_type(type));