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

报文中掺杂额外字节 #15

Open
wkgcass opened this issue Dec 3, 2019 · 8 comments
Open

报文中掺杂额外字节 #15

wkgcass opened this issue Dec 3, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@wkgcass
Copy link

wkgcass commented Dec 3, 2019

hi,我正在开发一个基于kcp的应用,使用rsock做隧道,发现rsock会塞一段“不是我发送的字节”到udp包中。

客户端macos,服务端linux,版本均为20180613_03

tcpdump抓包发现,偶尔会有一段我没有发送的字节掺杂到报文中:

每一行是一次抓到的多余报文,特征很明显:

f268b10bd0083eed1700b6bc82180c30f129d9000000b6db1a370000000000

f268b10bd0083eed1700b6bc82180c30f129e400000045e318370000000000

f268b10bd0083eed1700b6bc82180c30f129f200000083e517370000000000

f268b10bd0083eed1700b6bc82180c30f1290101000019e719370000000000

f268b10bd0083eed170089aac51cc4d6d8a510000000a5e9895e0000000000

你们看下是否需要我提供tcpdump文件?或者说这段报文是有什么特殊用途的,需要我应用层单独处理?

@wkgcass
Copy link
Author

wkgcass commented Dec 3, 2019

另外我怀疑如果只开一个tcp通道,多个udp口同时写会有并发问题(数据错乱),表现是这样:
我的应用在KCP之上还带了TLS加密,有时会报Tag错误。不用rsock udp直连不会有问题。开了多个tcp通道(数量远多于udp口时)没有看到这样的异常。

@wkgcass
Copy link
Author

wkgcass commented Dec 3, 2019

我目前暂时把这样特征的字节段跳过了,并且开了多个tcp通道
https://gist.github.com/wkgcass/9fb70d8c4f5312ef7727ec7542f982fa
暂时是能用了

@itblingfeng
Copy link

你看人家理你吗

@wkgcass
Copy link
Author

wkgcass commented Dec 27, 2019

你看人家理你吗

github不是朋友圈

@iceonsun
Copy link
Owner

上班忙。理解万岁。我抽空看看哈

@iceonsun iceonsun self-assigned this Feb 11, 2020
@iceonsun iceonsun added the bug Something isn't working label Feb 11, 2020
@iceonsun
Copy link
Owner

iceonsun commented Feb 11, 2020

另外我怀疑如果只开一个tcp通道,多个udp口同时写会有并发问题(数据错乱),表现是这样:
我的应用在KCP之上还带了TLS加密,有时会报Tag错误。不用rsock udp直连不会有问题。开了多个tcp通道(数量远多于udp口时)没有看到这样的异常。

f268b10bd0083eed1700b6bc82180c30f129e400000045e318370000000000

你server/client端的mac地址是不是f2:xx?

@wkgcass
Copy link
Author

wkgcass commented Feb 17, 2020

当时用的设备在公司,下周一复工了去看看

@wkgcass
Copy link
Author

wkgcass commented Feb 24, 2020

另外我怀疑如果只开一个tcp通道,多个udp口同时写会有并发问题(数据错乱),表现是这样:
我的应用在KCP之上还带了TLS加密,有时会报Tag错误。不用rsock udp直连不会有问题。开了多个tcp通道(数量远多于udp口时)没有看到这样的异常。

f268b10bd0083eed1700b6bc82180c30f129e400000045e318370000000000

你server/client端的mac地址是不是f2:xx?

不是的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants