From 8c746b3a2bfb67addbfa4d3d4b7c0dbc2e8ba985 Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Tue, 23 Jun 2015 14:17:10 +0200 Subject: ripe-atlas-fw: imported version 4680 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- eperd/evtdig.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'eperd/evtdig.c') diff --git a/eperd/evtdig.c b/eperd/evtdig.c index c94e884..de71a6b 100644 --- a/eperd/evtdig.c +++ b/eperd/evtdig.c @@ -56,6 +56,7 @@ #define O_CLASS 1008 #define O_QUERY 1009 #define O_OUTPUT_COBINED 1101 +#define O_CD 1010 #define DNS_FLAG_RD 0x0100 @@ -287,6 +288,7 @@ struct query_state { int opt_abuf; int opt_resolv_conf; int opt_rd; + int opt_cd; int opt_prepend_probe_id; int opt_evdns; int opt_rset; @@ -474,6 +476,7 @@ static struct option longopts[]= { "edns0", required_argument, NULL, 'e' }, { "nsid", no_argument, NULL, 'n' }, { "do", no_argument, NULL, 'd' }, + { "cd", no_argument, NULL, 'O_CD'}, { "retry", required_argument, NULL, O_RETRY }, { "resolv", no_argument, NULL, O_RESOLV_CONF }, @@ -689,10 +692,13 @@ static void mk_dns_buff(struct query_state *qry, u_char *packet) dns->ns_count = 0; dns->add_count = htons(0); - if (qry->opt_resolv_conf || qry->opt_rd ){ + if (qry->opt_resolv_conf || qry->opt_rd ) { dns->rd = 1; } + if (qry->opt_cd) + dns->cd = 1; + //point to the query portion qname =(u_char *)&packet[sizeof(struct DNS_HEADER)]; @@ -1309,6 +1315,7 @@ static void *tdig_init(int argc, char *argv[], void (*done)(void *state)) qry->opt_qbuf = 0; qry->opt_abuf = 1; qry->opt_rd = 0; + qry->opt_cd = 0; qry->opt_evdns = 0; qry->opt_rset = 0; qry->opt_prepend_probe_id = 0; @@ -1441,6 +1448,10 @@ static void *tdig_init(int argc, char *argv[], void (*done)(void *state)) } break; + case 'O_CD': + qry->opt_cd = 1; + break; + case 'O_CLASS': qry->qclass = strtoul(optarg, &check, 10); if ((qry->qclass >= 0 ) && -- cgit v1.2.3