Open ArthurCChen opened 2 years ago
Hello,
EFAULT
error, also known as Bad address
error, is returned if there is not enough space for the kernel to write data in.
You issue might come from:
struct tcp_info *others; // increase it if needed
You should not have a pointer here but an array that is big enough to store info for each subflows, e.g. others[3]
.
Note that another common source of issue is when your system has kernel C headers for an older kernel versions and structure are not big enough.
You can debug that by printing the sizeof sizes but also by looking at what the kernel has managed to write. You can find the order the kernel is writing info in by looking at where copy_from_user()
functions are used in mptcp_get_info()
https://github.com/multipath-tcp/mptcp/blob/7fa887be95fd36df097c92ff869e99f4f3c8a302/net/mptcp/mptcp_ctrl.c#L2791-L2909
Hi, My MPTCP pair: AWS EC2(as the server) & PC(as the client) (Both Ubuntu18.04 and Linux 4.19.234) works correctly according to the Wireshark. However, after adding the module:
it now continuously closes my WebSocket connection and reconnect. Exactly at this line:
getsockopt(<fd num>, IPPROTO_TCP, MPTCP_INFO, &minfo &len);
How did you install it? A: I downloaded MPTCP-V0.95 from the home page of MPTCP.(git clone) Then I make menuconfig and compile it and change the kernel according to the instruction
Which command are you using to compile this code? A: All the process is here:
All the previous setsockopt here were OK? A: Yes.
The return value of this getsockopt? A: It's not -1.