Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate answers in DNS queries #6648

Merged
merged 4 commits into from
Feb 13, 2024
Merged

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
22 checks passed
@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