Lines Matching defs:rr
49 dns_resource_record_unref(i->rr);
64 first = hashmap_get(z->by_key, i->rr->key);
67 assert_se(hashmap_replace(z->by_key, first->rr->key, first) >= 0);
69 hashmap_remove(z->by_key, i->rr->key);
71 first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
74 assert_se(hashmap_replace(z->by_name, DNS_RESOURCE_KEY_NAME(first->rr->key), first) >= 0);
76 hashmap_remove(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
96 static DnsZoneItem* dns_zone_get(DnsZone *z, DnsResourceRecord *rr) {
100 assert(rr);
102 LIST_FOREACH(by_key, i, hashmap_get(z->by_key, rr->key))
103 if (dns_resource_record_equal(i->rr, rr) > 0)
109 void dns_zone_remove_rr(DnsZone *z, DnsResourceRecord *rr) {
113 assert(rr);
115 i = dns_zone_get(z, rr);
140 first = hashmap_get(z->by_key, i->rr->key);
143 assert_se(hashmap_replace(z->by_key, first->rr->key, first) >= 0);
145 r = hashmap_put(z->by_key, i->rr->key, i);
150 first = hashmap_get(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key));
153 assert_se(hashmap_replace(z->by_name, DNS_RESOURCE_KEY_NAME(first->rr->key), first) >= 0);
155 r = hashmap_put(z->by_name, DNS_RESOURCE_KEY_NAME(i->rr->key), i);
172 t = dns_scope_find_transaction(i->scope, &DNS_RESOURCE_KEY_CONST(i->rr->key->class, DNS_TYPE_ANY, DNS_RESOURCE_KEY_NAME(i->rr->key)), false);
176 key = dns_resource_key_new(i->rr->key->class, DNS_TYPE_ANY, DNS_RESOURCE_KEY_NAME(i->rr->key));
215 int dns_zone_put(DnsZone *z, DnsScope *s, DnsResourceRecord *rr, bool probe) {
222 assert(rr);
224 if (dns_class_is_pseudo(rr->key->class))
226 if (dns_type_is_pseudo(rr->key->type))
229 existing = dns_zone_get(z, rr);
242 i->rr = dns_resource_record_ref(rr);
313 k = dns_resource_key_match_rr(key, j->rr, NULL);
383 k = dns_resource_key_match_rr(key, j->rr, NULL);
387 r = dns_answer_add(answer, j->rr, 0, DNS_ANSWER_AUTHENTICATED);
413 r = dns_answer_add(answer, j->rr, 0, DNS_ANSWER_AUTHENTICATED);
477 log_info("Detected conflict on %s", strna(dns_resource_record_to_string(i->rr)));
485 if (manager_is_own_hostname(i->scope->manager, DNS_RESOURCE_KEY_NAME(i->rr->key)) > 0)
526 log_debug("Record %s successfully probed.", strna(dns_resource_record_to_string(i->rr)));
540 log_debug("Verifying RR %s", strna(dns_resource_record_to_string(i->rr)));
553 int dns_zone_check_conflicts(DnsZone *zone, DnsResourceRecord *rr) {
558 assert(rr);
565 first = hashmap_get(zone->by_name, DNS_RESOURCE_KEY_NAME(rr->key));
570 if (dns_zone_get(zone, rr))
577 if (dns_resource_record_equal(i->rr, rr))
638 t = dns_resource_record_to_string(j->rr);