OpenDNSSEC-signer  2.0.4
notify.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 NLNet Labs. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
19  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
21  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
23  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  *
25  */
26 
32 #include "config.h"
33 #include "adapter/addns.h"
34 #include "daemon/xfrhandler.h"
35 #include "signer/domain.h"
36 #include "signer/zone.h"
37 #include "wire/notify.h"
38 #include "wire/xfrd.h"
39 
40 #include <sys/socket.h>
41 
42 static const char* notify_str = "notify";
43 
44 static void notify_handle_zone(netio_type* netio,
45  netio_handler_type* handler, netio_events_type event_types);
46 
47 
52 static time_t
53 notify_time(notify_type* notify)
54 {
55  ods_log_assert(notify);
56  ods_log_assert(notify->xfrhandler);
57  return xfrhandler_time((xfrhandler_type*) notify->xfrhandler);
58 }
59 
60 
65 static void
66 notify_set_timer(notify_type* notify, time_t t)
67 {
68  if (!notify || !notify->xfrhandler) {
69  return;
70  }
75  if(t > notify_time(notify) + 10) {
76  time_t extra = t - notify_time(notify);
77  time_t base = extra*9/10;
78 #ifdef HAVE_ARC4RANDOM_UNIFORM
79  t = notify_time(notify) + base +
80  arc4random_uniform(extra-base);
81 #elif HAVE_ARC4RANDOM
82  t = notify_time(notify) + base +
83  arc4random()%(extra-base);
84 #else
85  t = notify_time(notify) + base +
86  random()%(extra-base);
87 #endif
88  }
89  notify->handler.timeout = &notify->timeout;
90  notify->timeout.tv_sec = t;
91  notify->timeout.tv_nsec = 0;
92 }
93 
94 
101 {
102  notify_type* notify = NULL;
103  if (!xfrhandler || !zone) {
104  return NULL;
105  }
106  CHECKALLOC(notify = (notify_type*) malloc(sizeof(notify_type)));
107  if (!notify) {
108  ods_log_error("[%s] unable to create notify structure: "
109  " allocator_alloc() failed", notify_str);
110  return NULL;
111  }
112  notify->zone = zone;
113  notify->xfrhandler = xfrhandler;
114  notify->waiting_next = NULL;
115  notify->secondary = NULL;
116  notify->soa = NULL;
117  notify->tsig_rr = tsig_rr_create();
118  if (!notify->tsig_rr) {
119  notify_cleanup(notify);
120  return NULL;
121  }
122  notify->retry = 0;
123  notify->query_id = 0;
124  notify->is_waiting = 0;
125  notify->handler.fd = -1;
126  notify->timeout.tv_sec = 0;
127  notify->timeout.tv_nsec = 0;
128  notify->handler.timeout = NULL;
129  notify->handler.user_data = notify;
130  notify->handler.event_types =
132  notify->handler.event_handler = notify_handle_zone;
133  return notify;
134 }
135 
136 
141 static void
142 notify_setup(notify_type* notify)
143 {
144  zone_type* zone = NULL;
145  dnsout_type* dnsout = NULL;
146  if (!notify) {
147  return;
148  }
149  zone = (zone_type*) notify->zone;
150  ods_log_assert(zone);
151  ods_log_assert(zone->adoutbound);
152  ods_log_assert(zone->adoutbound->config);
153  ods_log_assert(zone->adoutbound->type == ADAPTER_DNS);
154  dnsout = (dnsout_type*) zone->adoutbound->config;
155  notify->retry = 0;
156  notify->secondary = dnsout->do_notify;
157  ods_log_debug("[%s] setup notify for zone %s", notify_str, zone->name);
158  notify_set_timer(notify, notify_time(notify));
159 }
160 
161 
166 static void
167 notify_disable(notify_type* notify)
168 {
169  xfrhandler_type* xfrhandler = NULL;
170  zone_type* zone = NULL;
171  if (!notify) {
172  return;
173  }
174  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
175  ods_log_assert(xfrhandler);
176  zone = (zone_type*) notify->zone;
177  ods_log_assert(zone);
178  ods_log_assert(zone->name);
179  notify->secondary = NULL;
180  notify->handler.timeout = NULL;
181  if (notify->handler.fd != -1) {
182  close(notify->handler.fd);
183  notify->handler.fd = -1;
184  }
185  if (xfrhandler->notify_udp_num == NOTIFY_MAX_UDP) {
186  while (xfrhandler->notify_waiting_first) {
187  notify_type* wn = xfrhandler->notify_waiting_first;
188  ods_log_assert(wn->is_waiting);
189  wn->is_waiting = 0;
190  xfrhandler->notify_waiting_first = wn->waiting_next;
191  if (xfrhandler->notify_waiting_last == wn) {
192  xfrhandler->notify_waiting_last = NULL;
193  }
194  if (wn->secondary) {
195  ods_log_debug("[%s] zone %s notify off waiting list",
196  notify_str, zone->name);
197  notify_setup(wn);
198  return;
199  }
200  }
201  }
202  ods_log_debug("[%s] notify for zone %s disabled", notify_str, zone->name);
203  xfrhandler->notify_udp_num--;
204 }
205 
206 
211 static void
212 notify_next(notify_type* notify)
213 {
214  if (!notify || !notify->secondary) {
215  return;
216  }
217  notify->secondary = notify->secondary->next;
218  notify->retry = 0;
219  if (!notify->secondary) {
220  zone_type* zone = (zone_type*) notify->zone;
221  ods_log_assert(zone);
222  ods_log_assert(zone->name);
223  ods_log_debug("[%s] zone %s no more secondaries, disable notify",
224  notify_str, zone->name);
225  notify_disable(notify);
226  }
227 }
228 
229 
234 static int
235 notify_udp_read_packet(notify_type* notify)
236 {
237  xfrhandler_type* xfrhandler = NULL;
238  ssize_t received = 0;
239  ods_log_assert(notify);
240  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
241  ods_log_assert(xfrhandler);
242  buffer_clear(xfrhandler->packet);
243  received = recvfrom(notify->handler.fd, buffer_begin(xfrhandler->packet),
244  buffer_remaining(xfrhandler->packet), 0, NULL, NULL);
245  if (received == -1) {
246  ods_log_error("[%s] unable to read packet: recvfrom() failed fd %d "
247  "(%s)", notify_str, notify->handler.fd, strerror(errno));
248  return 0;
249  }
250  buffer_set_limit(xfrhandler->packet, received);
251  return 1;
252 }
253 
254 
259 static int
260 notify_handle_reply(notify_type* notify)
261 {
262  xfrhandler_type* xfrhandler = NULL;
263  zone_type* zone = NULL;
264  ods_log_assert(notify);
265  ods_log_assert(notify->secondary);
266  ods_log_assert(notify->secondary->address);
267  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
268  zone = (zone_type*) notify->zone;
269  ods_log_assert(xfrhandler);
270  ods_log_assert(zone);
271  ods_log_assert(zone->name);
272  if (xfrhandler->packet->limit < 3 ||
273  (buffer_pkt_opcode(xfrhandler->packet) != LDNS_PACKET_NOTIFY) ||
274  (buffer_pkt_qr(xfrhandler->packet) == 0)) {
275  ods_log_error("[%s] zone %s received bad notify reply opcode/qr from %s",
276  notify_str, zone->name, notify->secondary->address);
277  return 0;
278  }
279  if (buffer_pkt_id(xfrhandler->packet) != notify->query_id) {
280  ods_log_error("[%s] zone %s received bad notify reply id from %s",
281  notify_str, zone->name, notify->secondary->address);
282  return 0;
283  }
284  /* could check tsig */
285  if (buffer_pkt_rcode(xfrhandler->packet) != LDNS_RCODE_NOERROR) {
286  const char* str = buffer_rcode2str(buffer_pkt_rcode(xfrhandler->packet));
287  ods_log_error("[%s] zone %s received bad notify rcode %s from %s",
288  notify_str, zone->name, str?str:"UNKNOWN",
289  notify->secondary->address);
290  if (buffer_pkt_rcode(xfrhandler->packet) != LDNS_RCODE_NOTIMPL) {
291  return 1;
292  }
293  return 0;
294  }
295  ods_log_debug("[%s] zone %s secondary %s notify reply ok", notify_str,
296  zone->name, notify->secondary->address);
297  return 1;
298 }
299 
300 
305 static int
306 notify_send_udp(notify_type* notify, buffer_type* buffer)
307 {
308  struct sockaddr_storage to;
309  socklen_t to_len = 0;
310  int fd = -1;
311  int family = PF_INET;
312  ssize_t nb = 0;
313  ods_log_assert(buffer);
314  ods_log_assert(notify);
315  ods_log_assert(notify->secondary);
316  ods_log_assert(notify->secondary->address);
317  /* this will set the remote port to acl->port or TCP_PORT */
318  to_len = xfrd_acl_sockaddr_to(notify->secondary, &to);
319  /* get the address family of the remote host */
320  if (notify->secondary->family == AF_INET6) {
321  family = PF_INET6;
322  }
323  /* create socket */
324  fd = socket(family, SOCK_DGRAM, IPPROTO_UDP);
325  if (fd == -1) {
326  ods_log_error("[%s] unable to send data over udp to %s: "
327  "socket() failed (%s)", notify_str, notify->secondary->address,
328  strerror(errno));
329  return -1;
330  }
331  /* bind it? */
332 
333  /* send it (udp) */
334  ods_log_deeebug("[%s] send %ld bytes over udp to %s", notify_str,
335  (unsigned long)buffer_remaining(buffer), notify->secondary->address);
336  nb = sendto(fd, buffer_current(buffer), buffer_remaining(buffer), 0,
337  (struct sockaddr*)&to, to_len);
338  if (nb == -1) {
339  ods_log_error("[%s] unable to send data over udp to %s: "
340  "sendto() failed (%s)", notify_str, notify->secondary->address,
341  strerror(errno));
342  close(fd);
343  return -1;
344  }
345  return fd;
346 }
347 
348 
353 static void
354 notify_tsig_sign(notify_type* notify, buffer_type* buffer)
355 {
356  tsig_algo_type* algo = NULL;
357  if (!notify || !notify->tsig_rr || !notify->secondary ||
358  !notify->secondary->tsig || !notify->secondary->tsig->key ||
359  !buffer) {
360  return; /* no tsig configured */
361  }
362  algo = tsig_lookup_algo(notify->secondary->tsig->algorithm);
363  if (!algo) {
364  ods_log_error("[%s] unable to sign notify: tsig unknown algorithm "
365  "%s", notify_str, notify->secondary->tsig->algorithm);
366  return;
367  }
368  ods_log_assert(algo);
369  tsig_rr_reset(notify->tsig_rr, algo, notify->secondary->tsig->key);
370  notify->tsig_rr->original_query_id = buffer_pkt_id(buffer);
371  notify->tsig_rr->algo_name =
372  ldns_rdf_clone(notify->tsig_rr->algo->wf_name);
373  notify->tsig_rr->key_name = ldns_rdf_clone(notify->tsig_rr->key->dname);
374  log_dname(notify->tsig_rr->key_name, "tsig sign notify with key",
375  LOG_DEBUG);
376  log_dname(notify->tsig_rr->algo_name, "tsig sign notify with algorithm",
377  LOG_DEBUG);
378  tsig_rr_prepare(notify->tsig_rr);
379  tsig_rr_update(notify->tsig_rr, buffer, buffer_position(buffer));
380  tsig_rr_sign(notify->tsig_rr);
381  ods_log_debug("[%s] tsig append rr to notify id=%u", notify_str,
382  buffer_pkt_id(buffer));
383  tsig_rr_append(notify->tsig_rr, buffer);
384  buffer_pkt_set_arcount(buffer, buffer_pkt_arcount(buffer)+1);
385  tsig_rr_prepare(notify->tsig_rr);
386 }
387 
388 
393 void
395 {
396  xfrhandler_type* xfrhandler = NULL;
397  zone_type* zone = NULL;
398  ods_log_assert(notify);
399  ods_log_assert(notify->secondary);
400  ods_log_assert(notify->secondary->address);
401  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
402  zone = (zone_type*) notify->zone;
403  ods_log_assert(xfrhandler);
404  ods_log_assert(zone);
405  ods_log_assert(zone->name);
406  if (notify->handler.fd != -1) {
407  close(notify->handler.fd);
408  }
409  notify->handler.fd = -1;
410  notify->timeout.tv_sec = notify_time(notify) + NOTIFY_RETRY_TIMEOUT;
411  buffer_pkt_notify(xfrhandler->packet, zone->apex, LDNS_RR_CLASS_IN);
412  notify->query_id = buffer_pkt_id(xfrhandler->packet);
413  buffer_pkt_set_aa(xfrhandler->packet);
414  /* add current SOA to answer section */
415  if (notify->soa) {
416  if (buffer_write_rr(xfrhandler->packet, notify->soa)) {
417  buffer_pkt_set_ancount(xfrhandler->packet, 1);
418  }
419  }
420  if (notify->secondary->tsig) {
421  notify_tsig_sign(notify, xfrhandler->packet);
422  }
423  buffer_flip(xfrhandler->packet);
424  notify->handler.fd = notify_send_udp(notify, xfrhandler->packet);
425  if (notify->handler.fd == -1) {
426  ods_log_error("[%s] unable to send notify retry %u for zone %s to "
427  "%s: notify_send_udp() failed", notify_str, notify->retry,
428  zone->name, notify->secondary->address);
429  return;
430  }
431  ods_log_verbose("[%s] notify retry %u for zone %s sent to %s", notify_str,
432  notify->retry, zone->name, notify->secondary->address);
433 }
434 
435 
440 static void
441 notify_handle_zone(netio_type* ATTR_UNUSED(netio),
442  netio_handler_type* handler, netio_events_type event_types)
443 {
444  notify_type* notify = NULL;
445  xfrhandler_type* xfrhandler = NULL;
446  zone_type* zone = NULL;
447  if (!handler) {
448  return;
449  }
450  notify = (notify_type*) handler->user_data;
451  ods_log_assert(notify);
452  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
453  zone = (zone_type*) notify->zone;
454  ods_log_assert(xfrhandler);
455  ods_log_assert(zone);
456  ods_log_assert(zone->name);
457  ods_log_debug("[%s] handle notify for zone %s", notify_str, zone->name);
458 
459  if (notify->is_waiting) {
460  ods_log_debug("[%s] already waiting, skipping notify for zone %s",
461  notify_str, zone->name);
462  ods_log_assert(notify->handler.fd == -1);
463  return;
464  }
465  if (event_types & NETIO_EVENT_READ) {
466  ods_log_debug("[%s] read notify ok for zone %s", notify_str,
467  zone->name);
468  ods_log_assert(notify->handler.fd != -1);
469  if (notify_udp_read_packet(notify)) {
470  if (notify_handle_reply(notify)) {
471  notify_next(notify);
472  }
473  }
474  } else if(event_types & NETIO_EVENT_TIMEOUT) {
475  ods_log_debug("[%s] notify timeout for zone %s", notify_str,
476  zone->name);
477  /* timeout, try again */
478  }
479  /* see if notify is still enabled */
480  if (notify->secondary) {
481  ods_log_assert(notify->secondary->address);
482  notify->retry++;
483  if (notify->retry > NOTIFY_MAX_RETRY) {
484  ods_log_verbose("[%s] notify max retry for zone %s, %s unreachable",
485  notify_str, zone->name, notify->secondary->address);
486  notify_next(notify);
487  } else {
488  notify_send(notify);
489  }
490  }
491 }
492 
493 
498 static void
499 notify_update_soa(notify_type* notify, ldns_rr* soa)
500 {
501  if (!notify) {
502  return;
503  }
504  if (notify->soa) {
505  ldns_rr_free(notify->soa);
506  }
507  notify->soa = soa;
508 }
509 
510 
515 void
516 notify_enable(notify_type* notify, ldns_rr* soa)
517 {
518  xfrhandler_type* xfrhandler = NULL;
519  zone_type* zone = NULL;
520  dnsout_type* dnsout = NULL;
521  if (!notify) {
522  return;
523  }
524  xfrhandler = (xfrhandler_type*) notify->xfrhandler;
525  ods_log_assert(xfrhandler);
526  zone = (zone_type*) notify->zone;
527  ods_log_assert(zone);
528  ods_log_assert(zone->name);
529  ods_log_assert(zone->adoutbound);
530  ods_log_assert(zone->adoutbound->config);
531  ods_log_assert(zone->adoutbound->type == ADAPTER_DNS);
532  dnsout = (dnsout_type*) zone->adoutbound->config;
533  if (!dnsout->do_notify) {
534  ods_log_warning("[%s] zone %s has no notify acl", notify_str,
535  zone->name);
536  return; /* nothing to do */
537  }
538  if (notify->is_waiting || notify->handler.fd != -1) {
539  ods_log_debug("[%s] zone %s already on waiting list", notify_str,
540  zone->name);
541  return;
542  }
543  notify_update_soa(notify, soa);
544  if (xfrhandler->notify_udp_num < NOTIFY_MAX_UDP) {
545  notify_setup(notify);
546  xfrhandler->notify_udp_num++;
547  ods_log_debug("[%s] zone %s notify enabled", notify_str,
548  zone->name);
549  return;
550  }
551  /* put it in waiting list */
552  notify->secondary = dnsout->do_notify;
553  notify->is_waiting = 1;
554  notify->waiting_next = NULL;
555  if (xfrhandler->notify_waiting_last) {
556  xfrhandler->notify_waiting_last->waiting_next = notify;
557  } else {
558  xfrhandler->notify_waiting_first = notify;
559  }
560  xfrhandler->notify_waiting_last = notify;
561  notify->handler.timeout = NULL;
562  ods_log_debug("[%s] zone %s notify on waiting list", notify_str,
563  zone->name);
564 }
565 
566 
571 void
573 {
574  if (!notify) {
575  return;
576  }
577  if (notify->handler.fd != -1) {
578  close(notify->handler.fd);
579  notify->handler.fd = -1;
580  }
581  if (notify->soa) {
582  ldns_rr_free(notify->soa);
583  }
584  tsig_rr_cleanup(notify->tsig_rr);
585  free(notify);
586 }
ldns_pkt_opcode buffer_pkt_opcode(buffer_type *buffer)
Definition: buffer.c:846
tsig_rr_type * tsig_rr
Definition: notify.h:59
tsig_algo_type * algo
Definition: tsig.h:129
unsigned is_waiting
Definition: notify.h:67
void tsig_rr_update(tsig_rr_type *trr, buffer_type *buffer, size_t length)
Definition: tsig.c:557
#define PF_INET6
Definition: netio.h:61
void notify_enable(notify_type *notify, ldns_rr *soa)
Definition: notify.c:516
void notify_send(notify_type *notify)
Definition: notify.c:394
void * config
Definition: adapter.h:61
#define NOTIFY_MAX_UDP
Definition: notify.h:48
uint16_t buffer_pkt_arcount(buffer_type *buffer)
Definition: buffer.c:1066
buffer_type * packet
Definition: xfrhandler.h:62
void buffer_flip(buffer_type *buffer)
Definition: buffer.c:112
void buffer_clear(buffer_type *buffer)
Definition: buffer.c:99
enum netio_events_enum netio_events_type
Definition: netio.h:76
socklen_t xfrd_acl_sockaddr_to(acl_type *acl, struct sockaddr_storage *to)
Definition: xfrd.c:537
tsig_algo_type * tsig_lookup_algo(const char *name)
Definition: tsig.c:256
#define NOTIFY_MAX_RETRY
Definition: notify.h:49
acl_type * next
Definition: acl.h:59
adapter_mode type
Definition: adapter.h:58
uint16_t query_id
Definition: notify.h:65
int family
Definition: acl.h:63
zone_type * zone
Definition: notify.h:61
ldns_rdf * wf_name
Definition: tsig.h:91
int buffer_pkt_qr(buffer_type *buffer)
Definition: buffer.c:810
void tsig_rr_reset(tsig_rr_type *trr, tsig_algo_type *algo, tsig_key_type *key)
Definition: tsig.c:291
void tsig_rr_append(tsig_rr_type *trr, buffer_type *buffer)
Definition: tsig.c:670
uint16_t buffer_pkt_id(buffer_type *buffer)
Definition: buffer.c:751
void notify_cleanup(notify_type *notify)
Definition: notify.c:572
uint8_t * buffer_current(buffer_type *buffer)
Definition: buffer.c:438
adapter_type * adoutbound
Definition: zone.h:73
const char * algorithm
Definition: tsig.h:113
void * user_data
Definition: netio.h:119
tsig_rr_type * tsig_rr_create()
Definition: tsig.c:273
void tsig_rr_prepare(tsig_rr_type *trr)
Definition: tsig.c:535
tsig_key_type * key
Definition: tsig.h:115
time_t xfrhandler_time(xfrhandler_type *xfrhandler)
Definition: xfrhandler.c:140
void buffer_pkt_set_ancount(buffer_type *buffer, uint16_t count)
Definition: buffer.c:1030
ldns_rdf * key_name
Definition: tsig.h:134
void buffer_set_limit(buffer_type *buffer, size_t limit)
Definition: buffer.c:385
notify_type * notify_waiting_first
Definition: xfrhandler.h:67
netio_event_handler_type event_handler
Definition: netio.h:131
void tsig_rr_cleanup(tsig_rr_type *trr)
Definition: tsig.c:830
notify_type * notify_create(xfrhandler_type *xfrhandler, zone_type *zone)
Definition: notify.c:100
void log_dname(ldns_rdf *rdf, const char *pre, int level)
Definition: domain.c:48
notify_type * notify_waiting_last
Definition: xfrhandler.h:68
ldns_rr * soa
Definition: notify.h:58
struct timespec timeout
Definition: notify.h:64
tsig_key_type * key
Definition: tsig.h:130
#define NOTIFY_RETRY_TIMEOUT
Definition: notify.h:50
ldns_rdf * dname
Definition: tsig.h:79
char * address
Definition: acl.h:61
uint8_t retry
Definition: notify.h:66
void buffer_pkt_set_aa(buffer_type *buffer)
Definition: buffer.c:882
const char * buffer_rcode2str(ldns_pkt_rcode rcode)
Definition: buffer.c:978
acl_type * do_notify
Definition: addns.h:63
xfrhandler_type * xfrhandler
Definition: notify.h:62
size_t limit
Definition: buffer.h:114
netio_events_type event_types
Definition: netio.h:124
void buffer_pkt_notify(buffer_type *buffer, ldns_rdf *qname, ldns_rr_class qclass)
Definition: buffer.c:1133
const char * name
Definition: zone.h:67
#define PF_INET
Definition: netio.h:58
size_t buffer_remaining(buffer_type *buffer)
Definition: buffer.c:463
int buffer_write_rr(buffer_type *buffer, ldns_rr *rr)
Definition: buffer.c:605
void tsig_rr_sign(tsig_rr_type *trr)
Definition: tsig.c:627
notify_type * waiting_next
Definition: notify.h:57
acl_type * secondary
Definition: notify.h:60
size_t buffer_position(buffer_type *buffer)
Definition: buffer.c:125
ldns_rdf * algo_name
Definition: tsig.h:135
void buffer_pkt_set_arcount(buffer_type *buffer, uint16_t count)
Definition: buffer.c:1078
netio_handler_type handler
Definition: notify.h:63
struct timespec * timeout
Definition: netio.h:115
uint16_t original_query_id
Definition: tsig.h:141
tsig_type * tsig
Definition: acl.h:69
ldns_rdf * apex
Definition: zone.h:59
uint8_t * buffer_begin(buffer_type *buffer)
Definition: buffer.c:426
ldns_pkt_rcode buffer_pkt_rcode(buffer_type *buffer)
Definition: buffer.c:954