Skip to content

Remove duplicate answers in DNS queries#6648

Merged
meitinger merged 4 commits intomitmproxy:mainfrom
sujaldev:dns
Feb 13, 2024
Merged

Remove duplicate answers in DNS queries#6648
meitinger merged 4 commits intomitmproxy:mainfrom
sujaldev:dns

Conversation

@sujaldev
Copy link
Contributor

@sujaldev sujaldev commented Feb 6, 2024

Description

Fixes #6647 by assuming all DNS queries are made over UDP, will need to be reworked when TCP support is added.

Checklist

  • I have updated tests where applicable.
  • I have added an entry to the CHANGELOG.

@meitinger
Copy link
Contributor

Good catch and thanks for the PR.

LGTM, but it shouldn't matter what value we use in the type param (as long as it's DGRAM or STREAM). If anything, we need to query/reflect the type of the upstream connection, not whether DNS answers via UDP or TCP.
Perhaps we should therefore just specify SOCK_STREAM, since it's usage for upstream endpoints is more likely as of today in mitmproxy. (But again, I don't know of any kconfig, sysctl, gai.conf or resolv.conf flags, that would allow only one of UDP and TCP but not the other.)

@mhils
Copy link
Member

mhils commented Feb 12, 2024

@meitinger: approver merges :)

@meitinger meitinger merged commit d317304 into mitmproxy:main Feb 13, 2024
@sujaldev sujaldev deleted the dns branch October 19, 2024 11:05
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.

Duplicate answers in DNS queries

3 participants