notify.c
Go to the documentation of this file.
/*
* Copyright (c) 2011 NLNet Labs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "config.h"
#include "adapter/addns.h"
#include "daemon/xfrhandler.h"
#include "signer/domain.h"
#include "signer/zone.h"
#include "wire/notify.h"
#include "wire/xfrd.h"
#include <sys/socket.h>
static const char* notify_str = "notify";
static void notify_handle_zone(netio_type* netio,
netio_handler_type* handler, netio_events_type event_types);
static time_t
notify_time(notify_type* notify)
{
ods_log_assert(notify);
ods_log_assert(notify->xfrhandler);
return xfrhandler_time((xfrhandler_type*) notify->xfrhandler);
}
static void
notify_set_timer(notify_type* notify, time_t t)
{
if (!notify || !notify->xfrhandler) {
return;
}
if(t > notify_time(notify) + 10) {
time_t extra = t - notify_time(notify);
time_t base = extra*9/10;
#ifdef HAVE_ARC4RANDOM_UNIFORM
t = notify_time(notify) + base +
arc4random_uniform(extra-base);
#elif HAVE_ARC4RANDOM
t = notify_time(notify) + base +
arc4random()%(extra-base);
#else
t = notify_time(notify) + base +
random()%(extra-base);
#endif
}
notify->handler.timeout = &notify->timeout;
notify->timeout.tv_sec = t;
notify->timeout.tv_nsec = 0;
}
notify_type*
notify_create(xfrhandler_type* xfrhandler, zone_type* zone)
{
notify_type* notify = NULL;
if (!xfrhandler || !zone) {
return NULL;
}
CHECKALLOC(notify = (notify_type*) malloc(sizeof(notify_type)));
if (!notify) {
ods_log_error("[%s] unable to create notify structure: "
" allocator_alloc() failed", notify_str);
return NULL;
}
notify->zone = zone;
notify->xfrhandler = xfrhandler;
notify->waiting_next = NULL;
notify->secondary = NULL;
notify->soa = NULL;
notify->tsig_rr = tsig_rr_create();
if (!notify->tsig_rr) {
notify_cleanup(notify);
return NULL;
}
notify->retry = 0;
notify->query_id = 0;
notify->is_waiting = 0;
notify->handler.fd = -1;
notify->timeout.tv_sec = 0;
notify->timeout.tv_nsec = 0;
notify->handler.timeout = NULL;
notify->handler.user_data = notify;
notify->handler.event_types =
NETIO_EVENT_READ|NETIO_EVENT_TIMEOUT;
notify->handler.event_handler = notify_handle_zone;
return notify;
}
static void
notify_setup(notify_type* notify)
{
zone_type* zone = NULL;
dnsout_type* dnsout = NULL;
if (!notify) {
return;
}
zone = (zone_type*) notify->zone;
ods_log_assert(zone);
ods_log_assert(zone->adoutbound);
ods_log_assert(zone->adoutbound->config);
ods_log_assert(zone->adoutbound->type == ADAPTER_DNS);
dnsout = (dnsout_type*) zone->adoutbound->config;
notify->retry = 0;
notify->secondary = dnsout->do_notify;
ods_log_debug("[%s] setup notify for zone %s", notify_str, zone->name);
notify_set_timer(notify, notify_time(notify));
}
static void
notify_disable(notify_type* notify)
{
xfrhandler_type* xfrhandler = NULL;
zone_type* zone = NULL;
if (!notify) {
return;
}
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
ods_log_assert(xfrhandler);
zone = (zone_type*) notify->zone;
ods_log_assert(zone);
ods_log_assert(zone->name);
notify->secondary = NULL;
notify->handler.timeout = NULL;
if (notify->handler.fd != -1) {
close(notify->handler.fd);
notify->handler.fd = -1;
}
if (xfrhandler->notify_udp_num == NOTIFY_MAX_UDP) {
while (xfrhandler->notify_waiting_first) {
notify_type* wn = xfrhandler->notify_waiting_first;
ods_log_assert(wn->is_waiting);
wn->is_waiting = 0;
xfrhandler->notify_waiting_first = wn->waiting_next;
if (xfrhandler->notify_waiting_last == wn) {
xfrhandler->notify_waiting_last = NULL;
}
if (wn->secondary) {
ods_log_debug("[%s] zone %s notify off waiting list",
notify_str, zone->name);
notify_setup(wn);
return;
}
}
}
ods_log_debug("[%s] notify for zone %s disabled", notify_str, zone->name);
xfrhandler->notify_udp_num--;
}
static void
notify_next(notify_type* notify)
{
if (!notify || !notify->secondary) {
return;
}
notify->secondary = notify->secondary->next;
notify->retry = 0;
if (!notify->secondary) {
zone_type* zone = (zone_type*) notify->zone;
ods_log_assert(zone);
ods_log_assert(zone->name);
ods_log_debug("[%s] zone %s no more secondaries, disable notify",
notify_str, zone->name);
notify_disable(notify);
}
}
static int
notify_udp_read_packet(notify_type* notify)
{
xfrhandler_type* xfrhandler = NULL;
ssize_t received = 0;
ods_log_assert(notify);
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
ods_log_assert(xfrhandler);
buffer_clear(xfrhandler->packet);
received = recvfrom(notify->handler.fd, buffer_begin(xfrhandler->packet),
buffer_remaining(xfrhandler->packet), 0, NULL, NULL);
if (received == -1) {
ods_log_error("[%s] unable to read packet: recvfrom() failed fd %d "
"(%s)", notify_str, notify->handler.fd, strerror(errno));
return 0;
}
buffer_set_limit(xfrhandler->packet, received);
return 1;
}
static int
notify_handle_reply(notify_type* notify)
{
xfrhandler_type* xfrhandler = NULL;
zone_type* zone = NULL;
ods_log_assert(notify);
ods_log_assert(notify->secondary);
ods_log_assert(notify->secondary->address);
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
zone = (zone_type*) notify->zone;
ods_log_assert(xfrhandler);
ods_log_assert(zone);
ods_log_assert(zone->name);
if (xfrhandler->packet->limit < 3 ||
(buffer_pkt_opcode(xfrhandler->packet) != LDNS_PACKET_NOTIFY) ||
(buffer_pkt_qr(xfrhandler->packet) == 0)) {
ods_log_error("[%s] zone %s received bad notify reply opcode/qr from %s",
notify_str, zone->name, notify->secondary->address);
return 0;
}
if (buffer_pkt_id(xfrhandler->packet) != notify->query_id) {
ods_log_error("[%s] zone %s received bad notify reply id from %s",
notify_str, zone->name, notify->secondary->address);
return 0;
}
/* could check tsig */
if (buffer_pkt_rcode(xfrhandler->packet) != LDNS_RCODE_NOERROR) {
const char* str = buffer_rcode2str(buffer_pkt_rcode(xfrhandler->packet));
ods_log_error("[%s] zone %s received bad notify rcode %s from %s",
notify_str, zone->name, str?str:"UNKNOWN",
notify->secondary->address);
if (buffer_pkt_rcode(xfrhandler->packet) != LDNS_RCODE_NOTIMPL) {
return 1;
}
return 0;
}
ods_log_debug("[%s] zone %s secondary %s notify reply ok", notify_str,
zone->name, notify->secondary->address);
return 1;
}
static int
notify_send_udp(notify_type* notify, buffer_type* buffer)
{
struct sockaddr_storage to;
socklen_t to_len = 0;
int fd = -1;
int family = PF_INET;
ssize_t nb = 0;
ods_log_assert(buffer);
ods_log_assert(notify);
ods_log_assert(notify->secondary);
ods_log_assert(notify->secondary->address);
/* this will set the remote port to acl->port or TCP_PORT */
to_len = xfrd_acl_sockaddr_to(notify->secondary, &to);
/* get the address family of the remote host */
if (notify->secondary->family == AF_INET6) {
family = PF_INET6;
}
/* create socket */
fd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
if (fd == -1) {
ods_log_error("[%s] unable to send data over udp to %s: "
"socket() failed (%s)", notify_str, notify->secondary->address,
strerror(errno));
return -1;
}
/* bind it */
interface_type interface = notify->xfrhandler->engine->dnshandler->interfaces->interfaces[0];
if (!interface.address) {
ods_log_error("[%s] unable to get the address of interface", notify_str);
close(fd);
return -1;
}
if (acl_parse_family(interface.address) == AF_INET) {
struct sockaddr_in addr;
addr.sin_family = acl_parse_family(interface.address);
addr.sin_addr = interface.addr.addr;
addr.sin_port = 0;
if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) != 0) {
ods_log_error("[%s] unable to bind address %s: bind failed %s", notify_str, interface.address, strerror(errno));
close(fd);
return -1;
}
}
else {
struct sockaddr_in6 addr6;
addr6.sin6_family = acl_parse_family(interface.address);
addr6.sin6_addr = interface.addr.addr6;
addr6.sin6_port = 0;
if (bind(fd, (struct sockaddr *) &addr6, sizeof(addr6)) != 0) {
ods_log_error("[%s] unable to bind address %s: bind() failed %s", notify_str, interface.address, strerror(errno));
close(fd);
return -1;
}
}
/* send it (udp) */
ods_log_deeebug("[%s] send %ld bytes over udp to %s", notify_str,
(unsigned long)buffer_remaining(buffer), notify->secondary->address);
nb = sendto(fd, buffer_current(buffer), buffer_remaining(buffer), 0,
(struct sockaddr*)&to, to_len);
if (nb == -1) {
ods_log_error("[%s] unable to send data over udp to %s: "
"sendto() failed (%s)", notify_str, notify->secondary->address,
strerror(errno));
close(fd);
return -1;
}
return fd;
}
static void
notify_tsig_sign(notify_type* notify, buffer_type* buffer)
{
tsig_algo_type* algo = NULL;
if (!notify || !notify->tsig_rr || !notify->secondary ||
!notify->secondary->tsig || !notify->secondary->tsig->key ||
!buffer) {
return; /* no tsig configured */
}
algo = tsig_lookup_algo(notify->secondary->tsig->algorithm);
if (!algo) {
ods_log_error("[%s] unable to sign notify: tsig unknown algorithm "
"%s", notify_str, notify->secondary->tsig->algorithm);
return;
}
ods_log_assert(algo);
tsig_rr_reset(notify->tsig_rr, algo, notify->secondary->tsig->key);
notify->tsig_rr->original_query_id = buffer_pkt_id(buffer);
notify->tsig_rr->algo_name =
ldns_rdf_clone(notify->tsig_rr->algo->wf_name);
notify->tsig_rr->key_name = ldns_rdf_clone(notify->tsig_rr->key->dname);
log_dname(notify->tsig_rr->key_name, "tsig sign notify with key",
LOG_DEBUG);
log_dname(notify->tsig_rr->algo_name, "tsig sign notify with algorithm",
LOG_DEBUG);
tsig_rr_prepare(notify->tsig_rr);
tsig_rr_update(notify->tsig_rr, buffer, buffer_position(buffer));
tsig_rr_sign(notify->tsig_rr);
ods_log_debug("[%s] tsig append rr to notify id=%u", notify_str,
buffer_pkt_id(buffer));
tsig_rr_append(notify->tsig_rr, buffer);
buffer_pkt_set_arcount(buffer, buffer_pkt_arcount(buffer)+1);
tsig_rr_prepare(notify->tsig_rr);
}
void
notify_send(notify_type* notify)
{
xfrhandler_type* xfrhandler = NULL;
zone_type* zone = NULL;
ods_log_assert(notify);
ods_log_assert(notify->secondary);
ods_log_assert(notify->secondary->address);
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
zone = (zone_type*) notify->zone;
ods_log_assert(xfrhandler);
ods_log_assert(zone);
ods_log_assert(zone->name);
if (notify->handler.fd != -1) {
close(notify->handler.fd);
}
notify->handler.fd = -1;
notify->timeout.tv_sec = notify_time(notify) + NOTIFY_RETRY_TIMEOUT;
buffer_pkt_notify(xfrhandler->packet, zone->apex, LDNS_RR_CLASS_IN);
notify->query_id = buffer_pkt_id(xfrhandler->packet);
buffer_pkt_set_aa(xfrhandler->packet);
/* add current SOA to answer section */
if (notify->soa) {
if (buffer_write_rr(xfrhandler->packet, notify->soa)) {
buffer_pkt_set_ancount(xfrhandler->packet, 1);
}
}
if (notify->secondary->tsig) {
notify_tsig_sign(notify, xfrhandler->packet);
}
buffer_flip(xfrhandler->packet);
notify->handler.fd = notify_send_udp(notify, xfrhandler->packet);
if (notify->handler.fd == -1) {
ods_log_error("[%s] unable to send notify retry %u for zone %s to "
"%s: notify_send_udp() failed", notify_str, notify->retry,
zone->name, notify->secondary->address);
return;
}
ods_log_verbose("[%s] notify retry %u for zone %s sent to %s", notify_str,
notify->retry, zone->name, notify->secondary->address);
}
static void
notify_handle_zone(netio_type* ATTR_UNUSED(netio),
netio_handler_type* handler, netio_events_type event_types)
{
notify_type* notify = NULL;
xfrhandler_type* xfrhandler = NULL;
zone_type* zone = NULL;
if (!handler) {
return;
}
notify = (notify_type*) handler->user_data;
ods_log_assert(notify);
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
zone = (zone_type*) notify->zone;
ods_log_assert(xfrhandler);
ods_log_assert(zone);
ods_log_assert(zone->name);
ods_log_debug("[%s] handle notify for zone %s", notify_str, zone->name);
if (notify->is_waiting) {
ods_log_debug("[%s] already waiting, skipping notify for zone %s",
notify_str, zone->name);
ods_log_assert(notify->handler.fd == -1);
return;
}
if (event_types & NETIO_EVENT_READ) {
ods_log_debug("[%s] read notify ok for zone %s", notify_str,
zone->name);
ods_log_assert(notify->handler.fd != -1);
if (notify_udp_read_packet(notify)) {
if (notify_handle_reply(notify)) {
notify_next(notify);
}
}
} else if(event_types & NETIO_EVENT_TIMEOUT) {
ods_log_debug("[%s] notify timeout for zone %s", notify_str,
zone->name);
/* timeout, try again */
}
/* see if notify is still enabled */
if (notify->secondary) {
ods_log_assert(notify->secondary->address);
notify->retry++;
if (notify->retry > NOTIFY_MAX_RETRY) {
ods_log_verbose("[%s] notify max retry for zone %s, %s unreachable",
notify_str, zone->name, notify->secondary->address);
notify_next(notify);
} else {
notify_send(notify);
}
}
}
static void
notify_update_soa(notify_type* notify, ldns_rr* soa)
{
if (!notify) {
return;
}
if (notify->soa) {
ldns_rr_free(notify->soa);
}
notify->soa = soa;
}
void
notify_enable(notify_type* notify, ldns_rr* soa)
{
xfrhandler_type* xfrhandler = NULL;
zone_type* zone = NULL;
dnsout_type* dnsout = NULL;
if (!notify) {
return;
}
xfrhandler = (xfrhandler_type*) notify->xfrhandler;
ods_log_assert(xfrhandler);
zone = (zone_type*) notify->zone;
ods_log_assert(zone);
ods_log_assert(zone->name);
ods_log_assert(zone->adoutbound);
ods_log_assert(zone->adoutbound->config);
ods_log_assert(zone->adoutbound->type == ADAPTER_DNS);
dnsout = (dnsout_type*) zone->adoutbound->config;
if (!dnsout->do_notify) {
ods_log_warning("[%s] zone %s has no notify acl", notify_str,
zone->name);
return; /* nothing to do */
}
if (notify->is_waiting || notify->handler.fd != -1) {
ods_log_debug("[%s] zone %s already on waiting list", notify_str,
zone->name);
return;
}
notify_update_soa(notify, soa);
if (xfrhandler->notify_udp_num < NOTIFY_MAX_UDP) {
notify_setup(notify);
xfrhandler->notify_udp_num++;
ods_log_debug("[%s] zone %s notify enabled", notify_str,
zone->name);
return;
}
/* put it in waiting list */
notify->secondary = dnsout->do_notify;
notify->is_waiting = 1;
notify->waiting_next = NULL;
if (xfrhandler->notify_waiting_last) {
xfrhandler->notify_waiting_last->waiting_next = notify;
} else {
xfrhandler->notify_waiting_first = notify;
}
xfrhandler->notify_waiting_last = notify;
notify->handler.timeout = NULL;
ods_log_debug("[%s] zone %s notify on waiting list", notify_str,
zone->name);
}
void
notify_cleanup(notify_type* notify)
{
if (!notify) {
return;
}
if (notify->handler.fd != -1) {
close(notify->handler.fd);
notify->handler.fd = -1;
}
if (notify->soa) {
ldns_rr_free(notify->soa);
}
tsig_rr_cleanup(notify->tsig_rr);
free(notify);
}
acl_parse_family
int acl_parse_family(const char *a)
Definition acl.c:104
ADAPTER_DNS
@ ADAPTER_DNS
Definition adapter.h:42
addns.h
buffer_clear
void buffer_clear(buffer_type *buffer)
Definition buffer.c:99
buffer_current
uint8_t * buffer_current(buffer_type *buffer)
Definition buffer.c:438
buffer_set_limit
void buffer_set_limit(buffer_type *buffer, size_t limit)
Definition buffer.c:385
buffer_rcode2str
const char * buffer_rcode2str(ldns_pkt_rcode rcode)
Definition buffer.c:978
buffer_pkt_qr
int buffer_pkt_qr(buffer_type *buffer)
Definition buffer.c:810
buffer_begin
uint8_t * buffer_begin(buffer_type *buffer)
Definition buffer.c:426
buffer_pkt_opcode
ldns_pkt_opcode buffer_pkt_opcode(buffer_type *buffer)
Definition buffer.c:846
buffer_pkt_rcode
ldns_pkt_rcode buffer_pkt_rcode(buffer_type *buffer)
Definition buffer.c:954
buffer_flip
void buffer_flip(buffer_type *buffer)
Definition buffer.c:112
buffer_position
size_t buffer_position(buffer_type *buffer)
Definition buffer.c:125
buffer_pkt_notify
void buffer_pkt_notify(buffer_type *buffer, ldns_rdf *qname, ldns_rr_class qclass)
Definition buffer.c:1133
buffer_pkt_arcount
uint16_t buffer_pkt_arcount(buffer_type *buffer)
Definition buffer.c:1066
buffer_remaining
size_t buffer_remaining(buffer_type *buffer)
Definition buffer.c:463
buffer_write_rr
int buffer_write_rr(buffer_type *buffer, ldns_rr *rr)
Definition buffer.c:605
buffer_pkt_set_ancount
void buffer_pkt_set_ancount(buffer_type *buffer, uint16_t count)
Definition buffer.c:1030
buffer_pkt_set_aa
void buffer_pkt_set_aa(buffer_type *buffer)
Definition buffer.c:882
buffer_pkt_set_arcount
void buffer_pkt_set_arcount(buffer_type *buffer, uint16_t count)
Definition buffer.c:1078
buffer_pkt_id
uint16_t buffer_pkt_id(buffer_type *buffer)
Definition buffer.c:751
log_dname
void log_dname(ldns_rdf *rdf, const char *pre, int level)
Definition domain.c:48
domain.h
PF_INET6
#define PF_INET6
Definition netio.h:61
netio_events_type
enum netio_events_enum netio_events_type
Definition netio.h:76
PF_INET
#define PF_INET
Definition netio.h:58
NETIO_EVENT_TIMEOUT
@ NETIO_EVENT_TIMEOUT
Definition netio.h:74
NETIO_EVENT_READ
@ NETIO_EVENT_READ
Definition netio.h:71
notify_create
notify_type * notify_create(xfrhandler_type *xfrhandler, zone_type *zone)
Definition notify.c:100
notify_send
void notify_send(notify_type *notify)
Definition notify.c:422
notify_cleanup
void notify_cleanup(notify_type *notify)
Definition notify.c:600
notify_enable
void notify_enable(notify_type *notify, ldns_rr *soa)
Definition notify.c:544
notify.h
NOTIFY_MAX_RETRY
#define NOTIFY_MAX_RETRY
Definition notify.h:49
NOTIFY_RETRY_TIMEOUT
#define NOTIFY_RETRY_TIMEOUT
Definition notify.h:50
NOTIFY_MAX_UDP
#define NOTIFY_MAX_UDP
Definition notify.h:48
acl_struct::family
int family
Definition acl.h:63
acl_struct::next
acl_type * next
Definition acl.h:59
acl_struct::address
char * address
Definition acl.h:61
acl_struct::tsig
tsig_type * tsig
Definition acl.h:69
adapter_struct::config
void * config
Definition adapter.h:61
adapter_struct::type
adapter_mode type
Definition adapter.h:58
buffer_struct
Definition buffer.h:112
dnsout_struct
Definition addns.h:61
dnsout_struct::do_notify
acl_type * do_notify
Definition addns.h:63
interface_struct
Definition listener.h:69
netio_handler_struct
Definition netio.h:102
netio_handler_struct::timeout
struct timespec * timeout
Definition netio.h:115
netio_handler_struct::fd
int fd
Definition netio.h:108
netio_handler_struct::event_types
netio_events_type event_types
Definition netio.h:124
netio_handler_struct::event_handler
netio_event_handler_type event_handler
Definition netio.h:131
netio_handler_struct::user_data
void * user_data
Definition netio.h:119
netio_struct
Definition netio.h:139
notify_struct
Definition notify.h:56
notify_struct::waiting_next
notify_type * waiting_next
Definition notify.h:57
notify_struct::secondary
acl_type * secondary
Definition notify.h:60
notify_struct::is_waiting
unsigned is_waiting
Definition notify.h:67
notify_struct::timeout
struct timespec timeout
Definition notify.h:64
notify_struct::xfrhandler
xfrhandler_type * xfrhandler
Definition notify.h:62
notify_struct::handler
netio_handler_type handler
Definition notify.h:63
notify_struct::retry
uint8_t retry
Definition notify.h:66
notify_struct::zone
zone_type * zone
Definition notify.h:61
notify_struct::tsig_rr
tsig_rr_type * tsig_rr
Definition notify.h:59
notify_struct::soa
ldns_rr * soa
Definition notify.h:58
notify_struct::query_id
uint16_t query_id
Definition notify.h:65
tsig_algo_struct
Definition tsig.h:89
tsig_algo_struct::wf_name
ldns_rdf * wf_name
Definition tsig.h:91
tsig_key_struct::dname
ldns_rdf * dname
Definition tsig.h:79
tsig_rr_struct::algo
tsig_algo_type * algo
Definition tsig.h:129
tsig_rr_struct::key
tsig_key_type * key
Definition tsig.h:130
tsig_rr_struct::original_query_id
uint16_t original_query_id
Definition tsig.h:141
tsig_rr_struct::algo_name
ldns_rdf * algo_name
Definition tsig.h:135
tsig_rr_struct::key_name
ldns_rdf * key_name
Definition tsig.h:134
tsig_struct::key
tsig_key_type * key
Definition tsig.h:115
tsig_struct::algorithm
const char * algorithm
Definition tsig.h:113
xfrhandler_struct
Definition xfrhandler.h:52
xfrhandler_struct::packet
buffer_type * packet
Definition xfrhandler.h:62
xfrhandler_struct::notify_udp_num
int notify_udp_num
Definition xfrhandler.h:69
xfrhandler_struct::notify_waiting_last
notify_type * notify_waiting_last
Definition xfrhandler.h:68
xfrhandler_struct::notify_waiting_first
notify_type * notify_waiting_first
Definition xfrhandler.h:67
zone_struct
Definition zone.h:60
zone_struct::apex
ldns_rdf * apex
Definition zone.h:61
zone_struct::name
const char * name
Definition zone.h:69
zone_struct::adoutbound
adapter_type * adoutbound
Definition zone.h:75
tsig_rr_cleanup
void tsig_rr_cleanup(tsig_rr_type *trr)
Definition tsig.c:832
tsig_rr_append
void tsig_rr_append(tsig_rr_type *trr, buffer_type *buffer)
Definition tsig.c:672
tsig_rr_sign
void tsig_rr_sign(tsig_rr_type *trr)
Definition tsig.c:629
tsig_rr_reset
void tsig_rr_reset(tsig_rr_type *trr, tsig_algo_type *algo, tsig_key_type *key)
Definition tsig.c:292
tsig_rr_update
void tsig_rr_update(tsig_rr_type *trr, buffer_type *buffer, size_t length)
Definition tsig.c:559
tsig_rr_prepare
void tsig_rr_prepare(tsig_rr_type *trr)
Definition tsig.c:537
tsig_rr_create
tsig_rr_type * tsig_rr_create()
Definition tsig.c:274
tsig_lookup_algo
tsig_algo_type * tsig_lookup_algo(const char *name)
Definition tsig.c:257
xfrd_acl_sockaddr_to
socklen_t xfrd_acl_sockaddr_to(acl_type *acl, struct sockaddr_storage *to)
Definition xfrd.c:537
xfrd.h
xfrhandler_time
time_t xfrhandler_time(xfrhandler_type *xfrhandler)
Definition xfrhandler.c:141
xfrhandler.h
zone.h