Skip to content

Fix dns parse failed#565

Merged
dxsup merged 5 commits intoharmonycloud:mainfrom
hocktea214:fix-dns-53
Aug 22, 2023
Merged

Fix dns parse failed#565
dxsup merged 5 commits intoharmonycloud:mainfrom
hocktea214:fix-dns-53

Conversation

@hocktea214
Copy link
Copy Markdown
Collaborator

Description

  • Add udp cache for datas which is out of order
  • Reduce the check for dns protocol

Related Issue

Issue-547

Motivation and Context

Qr in Rfc-2929
many DNS implementations copy the query header as the initial value of the response header without clearing bits.
Thus any attempt to use a "query" bit with a different meaning in a response or to define a query meaning for a "response" bit is dangerous given existing implementation.

Besides, the order of request and response with id may be out of order, eg.
req1 req2 req3 resp2 req4 resp1 resp2 resp4

How Has This Been Tested?

--- PASS: TestDnsProtocol (0.01s)
--- PASS: TestDnsProtocol/bad-qr (0.00s)
--- PASS: TestDnsProtocol/multi (0.00s)
--- PASS: TestDnsProtocol/sendmmsg (0.00s)
--- PASS: TestDnsProtocol/tcp_not_found (0.00s)
PASS

huxiangyuan added 2 commits August 17, 2023 20:30
Signed-off-by: huxiangyuan <huxiangyuan@harmonycloud.cn>
Signed-off-by: huxiangyuan <huxiangyuan@harmonycloud.cn>
@hocktea214 hocktea214 requested a review from dxsup August 17, 2023 12:51
huxiangyuan added 2 commits August 18, 2023 09:09
Signed-off-by: huxiangyuan <huxiangyuan@harmonycloud.cn>
Signed-off-by: huxiangyuan <huxiangyuan@harmonycloud.cn>
@dxsup dxsup merged commit 9da153e into harmonycloud:main Aug 22, 2023
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