-
Notifications
You must be signed in to change notification settings - Fork 220
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
fix: Workaround UDP port conflicts when another local process binds 53 #414
fix: Workaround UDP port conflicts when another local process binds 53 #414
Conversation
282c5f9
to
5e71385
Compare
Quite concise and powerful. Thanks for your contribution! |
5e71385
to
98a13a8
Compare
2ed8edd
to
a9fc8f9
Compare
Update:
|
9600eaa
to
8540721
Compare
ee9bb59
to
75e9e12
Compare
我加了了 link monitor,在 dae0 lladdr 变化的时候更新 neigh。 此外把 netns 用 struct 重写了,把超大函数切分成若干语义更清晰的小方法。 不过 setup netns 出错的时候我直接 fatal 了,因为测试了一下发现我不知道怎么简单正确地实现 “有错时重试的once.Do()”。。。 |
@jschwinger233 直接用 mutex 比较好,这样写起来比较容易 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 Since the PR has been fully tested, please consider merging it.
@daeuniverse/qa please give it a shot. Afterward, we may proceed to merge this PR. |
你的内核不支持 veth: containers/podman#12246 |
当把 更改dnsmasq监听端口后的dae日志time="Jan 11 03:55:26" level=info msg="192.168.1.248:63326 <-> 8.8.8.8:53" _qname=upload.wikimedia.org. dialer="LAX_Pro" dscp=0 mac="局域网客户端MAC地址" network="tcp4(DNS)" outbound=proxy pid=0 pname= policy=min_moving_avg qtype=AAAA
time="Jan 11 03:55:27" level=info msg="192.168.1.248:52409 <-> 8.8.8.8:53" _qname=upload.wikimedia.org. dialer="LAX_Pro" dscp=0 mac="局域网客户端MAC地址" network="tcp4(DNS)" outbound=proxy pid=0 pname= policy=min_moving_avg qtype=A
time="Jan 11 03:55:27" level=info msg="局域网客户端IPv6地址:51888 <-> upload.wikimedia.org:443" dialer="LAX_Pro" dscp=0 ip="[2620:0:861:ed1a::2:b]:443" mac="局域网客户端MAC地址" network=tcp6 outbound=proxy pid=0 pname= policy=min_moving_avg sniffed=upload.wikimedia.org
time="Jan 11 03:55:27" level=info msg="局域网客户端IPv6地址:51890 <-> upload.wikimedia.org:443" dialer="LAX_Pro" dscp=0 ip="[2620:0:861:ed1a::2:b]:443" mac="局域网客户端MAC地址" network=tcp6 outbound=proxy pid=0 pname= policy=min_moving_avg sniffed=upload.wikimedia.org
time="Jan 11 03:55:27" level=info msg="局域网客户端IPv6地址:51889 <-> upload.wikimedia.org:443" dialer="LAX_Pro" dscp=0 ip="[2620:0:861:ed1a::2:b]:443" mac="局域网客户端MAC地址" network=tcp6 outbound=proxy pid=0 pname= policy=min_moving_avg sniffed=upload.wikimedia.org
time="Jan 11 03:55:27" level=info msg="局域网客户端IPv6地址:51891 <-> upload.wikimedia.org:443" dialer="LAX_Pro" dscp=0 ip="[2620:0:861:ed1a::2:b]:443" mac="局域网客户端MAC地址" network=tcp6 outbound=proxy pid=0 pname= policy=min_moving_avg sniffed=upload.wikimedia.org
time="Jan 11 03:55:27" level=info msg="局域网客户端IPv6地址:51892 <-> upload.wikimedia.org:443" dialer="LAX_Pro" dscp=0 ip="[2620:0:861:ed1a::2:b]:443" mac="局域网客户端MAC地址" network=tcp6 outbound=proxy pid=0 pname= policy=min_moving_avg sniffed=upload.wikimedia.org |
@jschwinger233 需要什么内核参数吗,我们可以加到报错信息里,以及在 docs 中我们有位置可以添加提示 |
看5.15源码应该是只要 CONFIG_VETH=y 就会载入载入了 veth.ko: |
openwrt 官网有一篇容器的文章:https://openwrt.org/docs/guide-user/virtualization/docker_host?s[]=veth#create_veth_pair_for_container |
按照群里404大佬的建议安装了kmod-veth确实没报错了,大佬幸苦了 |
该PR在使用后不再出现端口冲突,但是dns请求不正常,换回0.4.0正常,dae请求完后dns响应无法到达发起dns响应的设备 环境Linux debian12net 6.1.0-16-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.67-1 (2023-12-12) x86_64 日志https://appp.me/KjUSaf 相关配置nftables
dae
子设备dns请求截图 |
|
@umlka Would you like to raise a discussion to explicitly document the steps/actions needed for this workaround? Also cc @jschwinger233 Your contribution means a lot to us. Thanks in advance. |
a8e57a6
to
52252eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a long journey. Thanks for your hard work!
Background
Setup an independent netns for transparent UDP socket if necessary (EADDRINUSE occurred).
Checklist
Full Changelogs
Issue Reference
Test Result