mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
EDNS test.
git-svn-id: file:///svn/unbound/trunk@329 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
66addd85e7
commit
687a99a82e
5 changed files with 13 additions and 4 deletions
|
|
@ -3,6 +3,7 @@
|
|||
outbound entry to the module.
|
||||
- testbound support for new serviced queries.
|
||||
- test for retry to TCP cannot use testbound any longer.
|
||||
- testns test for EDNS fallback, test for TCP fallback already exists.
|
||||
|
||||
21 May 2007: Wouter
|
||||
- small comment on hash table locking.
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ outnet_udp_cb(struct comm_point* c, void* arg, int error,
|
|||
memcpy(&key.addr, &reply_info->addr, reply_info->addrlen);
|
||||
key.addrlen = reply_info->addrlen;
|
||||
verbose(VERB_ALGO, "Incoming reply id=%4.4x addr=", key.id);
|
||||
log_addr(&key.addr, key.addrlen);
|
||||
|
||||
/* find it, see if this thing is a valid query response */
|
||||
verbose(VERB_ALGO, "lookup size is %d entries", (int)outnet->pending->count);
|
||||
|
|
@ -660,8 +659,7 @@ new_pending(struct outside_network* outnet, ldns_buffer* packet,
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
verbose(VERB_ALGO, "inserted new pending reply id=%4.4x addr=", pend->id);
|
||||
log_addr(&pend->addr, pend->addrlen);
|
||||
verbose(VERB_ALGO, "inserted new pending reply id=%4.4x", pend->id);
|
||||
return pend;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ static void matchline(const char* line, struct entry* e)
|
|||
e->match_all = true;
|
||||
} else if(str_keyword(&parse, "ttl")) {
|
||||
e->match_ttl = true;
|
||||
} else if(str_keyword(&parse, "DO")) {
|
||||
e->match_do = true;
|
||||
} else if(str_keyword(&parse, "UDP")) {
|
||||
e->match_transport = transport_udp;
|
||||
} else if(str_keyword(&parse, "TCP")) {
|
||||
|
|
@ -220,6 +222,7 @@ static struct entry* new_entry()
|
|||
e->match_qname = false;
|
||||
e->match_all = false;
|
||||
e->match_ttl = false;
|
||||
e->match_do = false;
|
||||
e->match_serial = false;
|
||||
e->ixfr_soa_serial = 0;
|
||||
e->match_transport = transport_any;
|
||||
|
|
@ -663,6 +666,10 @@ find_match(struct entry* entries, ldns_pkt* query_pkt,
|
|||
verbose(3, "bad serial\n");
|
||||
continue;
|
||||
}
|
||||
if(p->match_do && !ldns_pkt_edns_do(query_pkt)) {
|
||||
verbose(3, "no DO bit set\n");
|
||||
continue;
|
||||
}
|
||||
if(p->match_transport != transport_any && p->match_transport != transport) {
|
||||
verbose(3, "bad transport\n");
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@
|
|||
; 'serial=1023' makes the query match if ixfr serial is 1023.
|
||||
; 'all' has to match header byte for byte and all rrs in packet.
|
||||
; 'ttl' used with all, rrs in packet must also have matching TTLs.
|
||||
; 'DO' will match only queries with DO bit set.
|
||||
MATCH [opcode] [qtype] [qname] [serial=<value>] [all] [ttl]
|
||||
MATCH [UDP|TCP]
|
||||
MATCH [UDP|TCP] DO
|
||||
MATCH ...
|
||||
; Then the REPLY header is specified.
|
||||
REPLY opcode, rcode or flags.
|
||||
|
|
@ -160,6 +161,8 @@ struct entry {
|
|||
bool match_all;
|
||||
/** match ttls in the packet */
|
||||
bool match_ttl;
|
||||
/** match DO bit */
|
||||
bool match_do;
|
||||
/** match query serial with this value. */
|
||||
uint32_t ixfr_soa_serial;
|
||||
/** match on UDP/TCP */
|
||||
|
|
|
|||
BIN
testdata/fwd_no_edns.tpkg
vendored
Normal file
BIN
testdata/fwd_no_edns.tpkg
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue