[components][lwip] add support for independent dns services for multiple network devices#9433
Merged
Rbb666 merged 1 commit intoRT-Thread:masterfrom Dec 25, 2024
Merged
Conversation
Member
|
@zmshahaha 麻烦review一下呗 谢谢~ |
Member
|
@Yaochenger 可以帮忙测试下嘛,谢谢 |
Evlers
added a commit
to Evlers/rt-thread
that referenced
this pull request
Oct 8, 2024
…ple network devices [RT-Thread#9433]
Rbb666
approved these changes
Dec 25, 2024
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.
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
在使用多个网络设备时,
dns servers会被DHCP应答处理设置到所有网络设备WiFi + ETH + PPP三个网络设备的情况下,WiFi和ETH往往使用的是网关作为DNS服务器WiFi和ETH发起DHCP请求时,PPP设备(GSM模组)的DNS服务器也会被设置到WiFi和ETH的网关IP默认的网络是PPP网络设备,那么发起的DNS请求会到WiFi/ETH的网关IP去,导致gethostbyname超时以下是修改前的DNS IP
GSM启动较慢,WiFi和ETH先获取到了DNS,而后面启动的PPP网络设备将WiFi和ETH的DNS都给改掉了WiFi和ETH再次发起DHCP请求时,PPP网络设备的DNS会被换成WiFi和ETH的DNS你的解决方案是什么 (what is your solution)
添加独立的DNS Servers支持,每个网络设备都有自己的DNS,使用默认网络设备的DNS并在udp中绑定对应网络设备
dns.c文件的dns_send函数中,读取默认网络设备的dns servers并在发起udp数据前绑定该dns servers对应的网络设备DHCP应答中使用netdev_set_dns_server来设置对应网卡的DNS,而不是使用dns_setserver修改所有网络设备的DNS以下是修改后的DNS IP
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up