feat: improve emergency DNS configuration logic#4962
Open
rz467fzs7d wants to merge 1 commit intovernesong:devfrom
Open
feat: improve emergency DNS configuration logic#4962rz467fzs7d wants to merge 1 commit intovernesong:devfrom
rz467fzs7d wants to merge 1 commit intovernesong:devfrom
Conversation
Changes: - Only check DNS when dnsmasq is enabled - Prioritize using LAN interface DNS for emergency resolv.conf - Fallback to hardcoded DNS (119.29.29.29, 8.8.8.8) only when LAN DNS is not configured - Support multiple DNS servers from network.lan.dns configuration This prevents unnecessary emergency DNS activation and respects user's network configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the emergency DNS configuration logic to respect user's network settings and only activate when necessary.
Changes
network.lan.dnsconfiguration as emergency DNS firstMotivation
Current implementation always writes hardcoded emergency DNS (119.29.29.29, 8.8.8.8) when DNS check fails, even when:
This causes unexpected DNS configuration and potential privacy concerns.
Test Plan
Tested on OpenWrt with: