Why does the System throw "Operation not supported" error when setting MPTCP socket options

518 Views Asked by At

i am currently working on a small project trying to make a socks5 proxy to establish a mptcp connection. I did the whole Linux kernel configuration and it now is capable to connect to a server via mptcp.

Now i want to configure the socket options for MPTCP e.g. the MPTCP_ENABLE value. I set the mptcp_enabled variable to 2 so it should be active when a socket has set its MPTCP_ENABLED value to 1, refering to this.

Now i just wrote those lines in my code:

#define MPTCP_ENABLED 42
int fd = socket(remote->ai_addr->sa_family, SOCK_STREAM, 0);
int mptcpEnable = 1;
printf("set socket option: %d", setsockopt(fd, SOL_SOCKET, MPTCP_ENABLED, &mptcpEnable, sizeof(mptcpEnable));
printf("error: %s", strerror(errno));

When i execute the server with this changes the output is:

"set socket option: -1, error: Opertion not supported"

Setting a different option like the MPTCP_SCHEDULER doesn't throw any errors but it seems like it does not change anything in the behaviour of the connection, regarding at the information this website gives.

I hope anyone of you has an idea of what i am doing wrong or at least any ideas how to find it out.

0

There are 0 best solutions below