Bug 3956 - [ANCK 4.19] ip_early_demux参数导致查询到一个错误的socket
Summary: [ANCK 4.19] ip_early_demux参数导致查询到一个错误的socket
Status: NEW
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: net (show other bugs) net
Version: 4.19-026.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: XuanZhuo
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-06 20:18 UTC by songkai
Modified: 2023-02-06 20:18 UTC (History)
2 users (show)

See Also:


Attachments
问题结果 (5.19 KB, image/png)
2023-02-06 20:18 UTC, songkai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description songkai inspur_group 2023-02-06 20:18:28 UTC
Created attachment 623 [details]
问题结果

复现方法:

假设100.2.213.16为客户端,100.2.213.17为服务端,100.2.3.4为service ip

1. 在客户端中添加如下iptables策略
   -A OUTPUT -d 100.2.3.4/32 -p tcp -m tcp --dport 80 -j DNAT --todestination 100.2.213.17
    
   意为在100.2.213.16中访问server 100.2.3.4 的80端口,转为访问100.2.213.17的80端口

2. 为加快问题复现,在100.2.213.16中减少TCP的源端口选择范围
   
   net.ipv4.ip_local_port_range = 50000 50010

3. 在客户端100.2.213.16写程序连接100.2.213.17,尽量将11个端口消耗完毕

4. 通过测试程序连接100.2.3.4,此时会使用一个前面使用过的端口,则问题出现。

upstream已解决该问题03a3ca37e4c6478e3a84f04c8429dd5889e107fd

问题测试结果见附件图片。