Lines Matching refs:copy
1486 _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *copy = NULL; in dns_resource_record_copy()
1491 copy = dns_resource_record_new(rr->key); in dns_resource_record_copy()
1492 if (!copy) in dns_resource_record_copy()
1495 copy->ttl = rr->ttl; in dns_resource_record_copy()
1496 copy->expiry = rr->expiry; in dns_resource_record_copy()
1497 copy->n_skip_labels_signer = rr->n_skip_labels_signer; in dns_resource_record_copy()
1498 copy->n_skip_labels_source = rr->n_skip_labels_source; in dns_resource_record_copy()
1499 copy->unparsable = rr->unparsable; in dns_resource_record_copy()
1504 copy->srv.priority = rr->srv.priority; in dns_resource_record_copy()
1505 copy->srv.weight = rr->srv.weight; in dns_resource_record_copy()
1506 copy->srv.port = rr->srv.port; in dns_resource_record_copy()
1507 copy->srv.name = strdup(rr->srv.name); in dns_resource_record_copy()
1508 if (!copy->srv.name) in dns_resource_record_copy()
1516 copy->ptr.name = strdup(rr->ptr.name); in dns_resource_record_copy()
1517 if (!copy->ptr.name) in dns_resource_record_copy()
1522 copy->hinfo.cpu = strdup(rr->hinfo.cpu); in dns_resource_record_copy()
1523 if (!copy->hinfo.cpu) in dns_resource_record_copy()
1526 copy->hinfo.os = strdup(rr->hinfo.os); in dns_resource_record_copy()
1527 if (!copy->hinfo.os) in dns_resource_record_copy()
1533 copy->txt.items = dns_txt_item_copy(rr->txt.items); in dns_resource_record_copy()
1534 if (!copy->txt.items) in dns_resource_record_copy()
1539 copy->a = rr->a; in dns_resource_record_copy()
1543 copy->aaaa = rr->aaaa; in dns_resource_record_copy()
1547 copy->soa.mname = strdup(rr->soa.mname); in dns_resource_record_copy()
1548 if (!copy->soa.mname) in dns_resource_record_copy()
1550 copy->soa.rname = strdup(rr->soa.rname); in dns_resource_record_copy()
1551 if (!copy->soa.rname) in dns_resource_record_copy()
1553 copy->soa.serial = rr->soa.serial; in dns_resource_record_copy()
1554 copy->soa.refresh = rr->soa.refresh; in dns_resource_record_copy()
1555 copy->soa.retry = rr->soa.retry; in dns_resource_record_copy()
1556 copy->soa.expire = rr->soa.expire; in dns_resource_record_copy()
1557 copy->soa.minimum = rr->soa.minimum; in dns_resource_record_copy()
1561 copy->mx.priority = rr->mx.priority; in dns_resource_record_copy()
1562 copy->mx.exchange = strdup(rr->mx.exchange); in dns_resource_record_copy()
1563 if (!copy->mx.exchange) in dns_resource_record_copy()
1568 copy->loc = rr->loc; in dns_resource_record_copy()
1572 copy->sshfp.algorithm = rr->sshfp.algorithm; in dns_resource_record_copy()
1573 copy->sshfp.fptype = rr->sshfp.fptype; in dns_resource_record_copy()
1574 copy->sshfp.fingerprint = memdup(rr->sshfp.fingerprint, rr->sshfp.fingerprint_size); in dns_resource_record_copy()
1575 if (!copy->sshfp.fingerprint) in dns_resource_record_copy()
1577 copy->sshfp.fingerprint_size = rr->sshfp.fingerprint_size; in dns_resource_record_copy()
1581 copy->dnskey.flags = rr->dnskey.flags; in dns_resource_record_copy()
1582 copy->dnskey.protocol = rr->dnskey.protocol; in dns_resource_record_copy()
1583 copy->dnskey.algorithm = rr->dnskey.algorithm; in dns_resource_record_copy()
1584 copy->dnskey.key = memdup(rr->dnskey.key, rr->dnskey.key_size); in dns_resource_record_copy()
1585 if (!copy->dnskey.key) in dns_resource_record_copy()
1587 copy->dnskey.key_size = rr->dnskey.key_size; in dns_resource_record_copy()
1591 copy->rrsig.type_covered = rr->rrsig.type_covered; in dns_resource_record_copy()
1592 copy->rrsig.algorithm = rr->rrsig.algorithm; in dns_resource_record_copy()
1593 copy->rrsig.labels = rr->rrsig.labels; in dns_resource_record_copy()
1594 copy->rrsig.original_ttl = rr->rrsig.original_ttl; in dns_resource_record_copy()
1595 copy->rrsig.expiration = rr->rrsig.expiration; in dns_resource_record_copy()
1596 copy->rrsig.inception = rr->rrsig.inception; in dns_resource_record_copy()
1597 copy->rrsig.key_tag = rr->rrsig.key_tag; in dns_resource_record_copy()
1598 copy->rrsig.signer = strdup(rr->rrsig.signer); in dns_resource_record_copy()
1599 if (!copy->rrsig.signer) in dns_resource_record_copy()
1601 copy->rrsig.signature = memdup(rr->rrsig.signature, rr->rrsig.signature_size); in dns_resource_record_copy()
1602 if (!copy->rrsig.signature) in dns_resource_record_copy()
1604 copy->rrsig.signature_size = rr->rrsig.signature_size; in dns_resource_record_copy()
1608 copy->nsec.next_domain_name = strdup(rr->nsec.next_domain_name); in dns_resource_record_copy()
1609 if (!copy->nsec.next_domain_name) in dns_resource_record_copy()
1612 copy->nsec.types = bitmap_copy(rr->nsec.types); in dns_resource_record_copy()
1613 if (!copy->nsec.types) in dns_resource_record_copy()
1619 copy->ds.key_tag = rr->ds.key_tag; in dns_resource_record_copy()
1620 copy->ds.algorithm = rr->ds.algorithm; in dns_resource_record_copy()
1621 copy->ds.digest_type = rr->ds.digest_type; in dns_resource_record_copy()
1622 copy->ds.digest = memdup(rr->ds.digest, rr->ds.digest_size); in dns_resource_record_copy()
1623 if (!copy->ds.digest) in dns_resource_record_copy()
1625 copy->ds.digest_size = rr->ds.digest_size; in dns_resource_record_copy()
1629 copy->nsec3.algorithm = rr->nsec3.algorithm; in dns_resource_record_copy()
1630 copy->nsec3.flags = rr->nsec3.flags; in dns_resource_record_copy()
1631 copy->nsec3.iterations = rr->nsec3.iterations; in dns_resource_record_copy()
1632 copy->nsec3.salt = memdup(rr->nsec3.salt, rr->nsec3.salt_size); in dns_resource_record_copy()
1633 if (!copy->nsec3.salt) in dns_resource_record_copy()
1635 copy->nsec3.salt_size = rr->nsec3.salt_size; in dns_resource_record_copy()
1636 …copy->nsec3.next_hashed_name = memdup(rr->nsec3.next_hashed_name, rr->nsec3.next_hashed_name_size); in dns_resource_record_copy()
1637 if (!copy->nsec3.next_hashed_name) in dns_resource_record_copy()
1639 copy->nsec3.next_hashed_name_size = rr->nsec3.next_hashed_name_size; in dns_resource_record_copy()
1641 copy->nsec3.types = bitmap_copy(rr->nsec3.types); in dns_resource_record_copy()
1642 if (!copy->nsec3.types) in dns_resource_record_copy()
1648 copy->tlsa.cert_usage = rr->tlsa.cert_usage; in dns_resource_record_copy()
1649 copy->tlsa.selector = rr->tlsa.selector; in dns_resource_record_copy()
1650 copy->tlsa.matching_type = rr->tlsa.matching_type; in dns_resource_record_copy()
1651 copy->tlsa.data = memdup(rr->tlsa.data, rr->tlsa.data_size); in dns_resource_record_copy()
1652 if (!copy->tlsa.data) in dns_resource_record_copy()
1654 copy->tlsa.data_size = rr->tlsa.data_size; in dns_resource_record_copy()
1658 copy->caa.flags = rr->caa.flags; in dns_resource_record_copy()
1659 copy->caa.tag = strdup(rr->caa.tag); in dns_resource_record_copy()
1660 if (!copy->caa.tag) in dns_resource_record_copy()
1662 copy->caa.value = memdup(rr->caa.value, rr->caa.value_size); in dns_resource_record_copy()
1663 if (!copy->caa.value) in dns_resource_record_copy()
1665 copy->caa.value_size = rr->caa.value_size; in dns_resource_record_copy()
1670 copy->generic.data = memdup(rr->generic.data, rr->generic.data_size); in dns_resource_record_copy()
1671 if (!copy->generic.data) in dns_resource_record_copy()
1673 copy->generic.data_size = rr->generic.data_size; in dns_resource_record_copy()
1677 t = TAKE_PTR(copy); in dns_resource_record_copy()
1808 DnsTxtItem *copy = NULL, *end = NULL; in dns_txt_item_copy() local
1815 dns_txt_item_free_all(copy); in dns_txt_item_copy()
1819 LIST_INSERT_AFTER(items, copy, end, j); in dns_txt_item_copy()
1823 return copy; in dns_txt_item_copy()