- For #762: Cleaner manpage text and uniform use of the term DNS

Cookies.
This commit is contained in:
George Thessalonikefs
2023-08-05 20:00:37 +02:00
parent 8580a74b37
commit fbc0256825
9 changed files with 45 additions and 38 deletions
+4 -4
View File
@@ -954,7 +954,7 @@ extract_ede(uint8_t* pkt, size_t len)
return sldns_read_uint16(buf);
}
/** Snips the EDNS Cookie option out of the OPT record and puts it in the
/** Snips the DNS Cookie option out of the OPT record and puts it in the
* provided cookie buffer (should be at least 24 octets).
* Returns the length of the cookie if found, else -1. */
static int
@@ -1566,17 +1566,17 @@ find_match(struct entry* entries, uint8_t* query_pkt, size_t len,
int cookie_len = extract_cookie(query_pkt, len,
cookie);
if(cookie_len == -1) {
verbose(3, "bad EDNS Cookie. "
verbose(3, "bad DNS Cookie. "
"Expected but not found\n");
continue;
} else if(p->match_client_cookie &&
cookie_len != 8) {
verbose(3, "bad EDNS Cookie. Expected client "
verbose(3, "bad DNS Cookie. Expected client "
"cookie of length 8.");
continue;
} else if((p->match_server_cookie) &&
cookie_len != 24) {
verbose(3, "bad EDNS Cookie. Expected server "
verbose(3, "bad DNS Cookie. Expected server "
"cookie of length 24.");
continue;
}
+6 -6
View File
@@ -64,13 +64,13 @@ struct sldns_file_parse_state;
; 'ede=any' makes the query match any EDNS EDE info-code.
; It also snips the EDE record out of the packet to facilitate
; other matches.
; 'client_cookie' makes the query match any EDNS Cookie option with
; 'client_cookie' makes the query match any DNS Cookie option with
; with a length of 8 octets.
; It also snips the EDNS Cookie record out of the packet to
; It also snips the DNS Cookie record out of the packet to
; facilitate other matches.
; 'server_cookie' makes the query match any EDNS Cookie option with
; 'server_cookie' makes the query match any DNS Cookie option with
; with a length of 24 octets.
; It also snips the EDNS Cookie record out of the packet to
; It also snips the DNS Cookie record out of the packet to
; facilitate other matches.
MATCH [opcode] [qtype] [qname] [serial=<value>] [all] [ttl]
MATCH [UDP|TCP] DO
@@ -222,9 +222,9 @@ struct entry {
uint8_t match_noedns;
/** match edns data field given in hex */
uint8_t match_ednsdata_raw;
/** match an EDNS cookie of length 8 */
/** match an DNS cookie of length 8 */
uint8_t match_client_cookie;
/** match an EDNS cookie of length 24 */
/** match an DNS cookie of length 24 */
uint8_t match_server_cookie;
/** match query serial with this value. */
uint32_t ixfr_soa_serial;
+2 -2
View File
@@ -716,11 +716,11 @@ edns_cookie_rfc9018_a1(void)
unit_assert(memcmp(server_cookie, buf, 24) == 0);
}
/** test interoperable EDNS cookies (RFC9018) */
/** test interoperable DNS cookies (RFC9018) */
static void
edns_cookie_test(void)
{
unit_show_feature("interoperable edns cookies");
unit_show_feature("interoperable dns cookies");
/* Check RFC9018 appendix test vectors */
edns_cookie_rfc9018_a1();
edns_cookie_rfc9018_a2();