Default-off 0x20 encoding and provide --do-0x20-encode option.

For now, this causes too many problems to default on.

Hopefully this will change for future releases.
This commit is contained in:
Simon Kelley committed 2025-03-04 12:59:17 +00:00
1 parent 9df1bd0cc1
commit e427d4b0e6
3 files changed
+8 -4

No files matched your search

+3 -3
View File
@@ -391,7 +391,7 @@ static void forward_query(int udpfd, union mysockaddr *udpaddr,
forward->new_id = get_id();
header->id = ntohs(forward->new_id);
forward->frec_src.encode_bitmap = option_bool(OPT_NO_0x20) ? 0 : rand32();
forward->frec_src.encode_bitmap = (!option_bool(OPT_NO_0x20) && option_bool(OPT_DO_0x20)) ? rand32() : 0;
forward->frec_src.encode_bigmap = NULL;
p = (unsigned char *)(header+1);
if (!extract_name(header, plen, &p, (char *)&forward->frec_src.encode_bitmap, EXTR_NAME_FLIP, 1))
@@ -3200,12 +3200,12 @@ static struct frec *lookup_frec(char *target, int class, int rrtype, int id, int
struct dns_header *header;
int compare_mode = EXTR_NAME_COMPARE;
/* Only compare case-sensitive when matching frec to a recieved answer,
/* Only compare case-sensitive when matching frec to a received answer,
NOT when looking for a duplicated question. */
if (flags & FREC_ANSWER)
{
flags &= ~FREC_ANSWER;
if (!option_bool(OPT_NO_0x20))
if (!option_bool(OPT_NO_0x20) && option_bool(OPT_DO_0x20))
compare_mode = EXTR_NAME_NOCASE;
}