summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorMatthijs Mekking <matje@NLnetLabs.nl>2009-10-28 09:44:26 +0100
committerMatthijs Mekking <matje@NLnetLabs.nl>2009-10-28 09:44:26 +0100
commit193fc233444601253c07c04be24a3dcfb95392ed (patch)
treec726a227fc8836071de47eae39a5a347b62bc38b /rr.c
parent376c35e1be07779b7a9aa5a06fb315882366df8b (diff)
downloadldns-193fc233444601253c07c04be24a3dcfb95392ed.tar.gz
$ORIGIN tld.
; followed by a RR of format: @ IN NS ns1 should also update prev_name
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rr.c b/rr.c
index 30db0c97..05cb45ef 100644
--- a/rr.c
+++ b/rr.c
@@ -268,6 +268,12 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
/* default to root */
ldns_rr_set_owner(new, ldns_dname_new_frm_str("."));
}
+
+ /* @ also overrides prev */
+ if (prev) {
+ ldns_rdf_deep_free(*prev);
+ *prev = ldns_rdf_clone(ldns_rr_owner(new));
+ }
} else {
if (strlen(owner) == 0) {
/* no ownername was given, try prev, if that fails