multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
888 stars 335 forks source link

Effect of setsockopt #377

Closed alex1230608 closed 4 years ago

alex1230608 commented 4 years ago

Hi, I have one question about setsockopt in mptcp.

I am using C to write a socket program, and the kernel is using the mptcp-support kernel (v0.90). if my application calls setsockopt such as changing the tos field for all packet with the following function call in C language, will this take effect on all subflows? setsockopt(sockid, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));

From what I see in tcpdump, the tos field seems to be 0 even with the above setsockopt function call. On the other hand, the same program can set the tos field if I disable mptcp.

Is there any special usage of the tos field in mptcp implementation? Since I have a programmable NIC, I can still set the tos field after the kernel, but I need to make sure this won't affect the correctness of mptcp.

cpaasch commented 4 years ago

Hello, which version of MPTCP are you using?

alex1230608 commented 4 years ago

It's v0.90 pulled from this github repo, and compile with my kernel on CentOS 7.6

cpaasch commented 4 years ago

That is a very old kernel version. You should use the most recent one, version 0.95.

It should be working there. I don't know about the state of v0.90 - it is several years old. Please report back if the issue persists in v0.95. Thanks!

alex1230608 commented 4 years ago

Thanks. However, may I ask the expected behavior in the latest version? Will a single setsockopt (TOS at least) on the master socket take effect on all subflow traffic?

alex1230608 commented 4 years ago

I didn't see the problem in v0.95, so it may be a problem of the old version. Thanks.

cpaasch commented 4 years ago

Yes, IP_TOS should be propagated to all subflows.