Skip to content

DNS: fix error in checking query ID#82

Merged
davidchisnall merged 1 commit intoCHERIoT-Platform:mainfrom
rmn30:rmn30/dns_query_id
Feb 5, 2026
Merged

DNS: fix error in checking query ID#82
davidchisnall merged 1 commit intoCHERIoT-Platform:mainfrom
rmn30:rmn30/dns_query_id

Conversation

@rmn30
Copy link
Contributor

@rmn30 rmn30 commented Feb 5, 2026

This check of DNS query ID was totally wrong as it:

  1. was checking for equality instead of inequality
  2. was unnecessarily byte swapping the queryID

These two errors combined so that responses were accepted providing the byte swapped queryID did not match the expected queryID. This meant most responses were accepted unless the query ID had two equal bytes, which occassionally happened by chance and caused the query to time out until the next query chose a different queryID.

This check of DNS query ID was totally wrong as it:

1) was checking for equality instead of inequality
2) was unnecessarily byte swapping the queryID

These two errors combined so that responses were accepted providing
the byte swapped queryID did not match the expected queryID.  This
meant most responses were accepted unless the query ID had two equal
bytes, which occassionally happened by chance and caused the query to
time out until the next query chose a different queryID.
@rmn30
Copy link
Contributor Author

rmn30 commented Feb 5, 2026

@hlef might find this amusing

@davidchisnall davidchisnall merged commit 17a6d07 into CHERIoT-Platform:main Feb 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants