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

Sockopt: Fix Windows UDP interface bind; Allow customSockopt work for UDP #4504

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

Fangliding
Copy link
Member

@Fangliding Fangliding commented Mar 18, 2025

字面意思 老的代码里对ipv4的判断只使用了tcp4 导致udp4漏判进入v6处理流程

以及很久之前提到的 customSockopt 移出 isTCPSocket 作用区允许它操作udp
作为扩展 新增了一个network选项为 customSockopt 指定它需要操作的网络栈

@Fangliding Fangliding marked this pull request as draft March 18, 2025 15:41
@RPRX
Copy link
Member

RPRX commented Mar 20, 2025

我记得之前我们讨论过,link 你还能找到吗

@Fangliding
Copy link
Member Author

windows sockopt我记得我应该没参与 这个是draft的原因是xq说还是没用 估计还得看

@RPRX
Copy link
Member

RPRX commented Mar 20, 2025

#4007 (comment)

@Fangliding Fangliding marked this pull request as ready for review March 20, 2025 17:44
@Fangliding
Copy link
Member Author

OKK 没有问题了

@RPRX
Copy link
Member

RPRX commented Mar 21, 2025

@Fangliding

@Fangliding
Copy link
Member Author

network放到1?

@RPRX
Copy link
Member

RPRX commented Mar 21, 2025

话说这个 network 就是为了区分 v4 和 v6?有必要吗

@RPRX
Copy link
Member

RPRX commented Mar 21, 2025

我感觉既然 level 已经区分了 tcp 和 udp,如果再用个 network 来区分会有点乱,可以改成只区分 v4 v6

@RPRX
Copy link
Member

RPRX commented Mar 21, 2025

等下,好像也不重复,如果 level 是 "IPPROTO_IP"

@Fangliding
Copy link
Member Author

我感觉既然 level 已经区分了 tcp 和 udp,如果再用个 network 来区分会有点乱,可以改成只区分 v4 v6

对着udp socket操作类似tfo这样的东西大概会刷堆err log, syscall可不认识level 它只会把这几个整数抛给系统然后还个err回来

@RPRX RPRX changed the title Fix Windows udp interface bind and allow customSockopt work in udp Sockopt: Fix Windows UDP interface bind, Allow customSockopt work in UDP Mar 21, 2025
@RPRX RPRX changed the title Sockopt: Fix Windows UDP interface bind, Allow customSockopt work in UDP Sockopt: Fix Windows UDP interface bind, Allow customSockopt work for UDP Mar 21, 2025
@RPRX RPRX changed the title Sockopt: Fix Windows UDP interface bind, Allow customSockopt work for UDP Sockopt: Fix Windows UDP interface bind; Allow customSockopt work for UDP Mar 21, 2025
@RPRX RPRX merged commit b585b26 into main Mar 21, 2025
70 checks passed
@RPRX
Copy link
Member

RPRX commented Mar 21, 2025

用逗号分隔还是有点怪,以后用分号吧

@RPRX RPRX deleted the sockopt-udp-fix branch March 21, 2025 20:24
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.

2 participants