summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/dns/tkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/dns/tkey.c')
-rw-r--r--contrib/bind9/lib/dns/tkey.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/bind9/lib/dns/tkey.c b/contrib/bind9/lib/dns/tkey.c
index 0112f7e..161c188 100644
--- a/contrib/bind9/lib/dns/tkey.c
+++ b/contrib/bind9/lib/dns/tkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -991,8 +991,13 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
ISC_LIST_INIT(namelist);
RETERR(add_rdata_to_list(msg, &keyname, rdata, 0, &namelist));
- dns_message_addname(msg, ISC_LIST_HEAD(namelist),
- DNS_SECTION_ADDITIONAL);
+ name = ISC_LIST_HEAD(namelist);
+ while (name != NULL) {
+ dns_name_t *next = ISC_LIST_NEXT(name, link);
+ ISC_LIST_UNLINK(namelist, name, link);
+ dns_message_addname(msg, name, DNS_SECTION_ADDITIONAL);
+ name = next;
+ }
return (ISC_R_SUCCESS);
OpenPOWER on IntegriCloud