shadowsocks / shadowsocks-libev

Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust
https://github.com/shadowsocks/shadowsocks-rust
GNU General Public License v3.0
15.81k stars 5.7k forks source link

TFO error in PandoraBox OpenWRT 3.14 kernel #1875

Closed xsm1997 closed 6 years ago

xsm1997 commented 6 years ago

Please answer these questions before submitting your issue. Thanks!

(Please mention that if the issue you filed is solved, you may wish to close it by yourself. Thanks again.)

(PS, you can remove 3 lines above, including this one, before post your issue.)

What version of shadowsocks-libev are you using?

3.1.2

What operating system are you using?

PandoraBox OpenWRT 17.12

What did you do?

I turned on the TCP Fast Open option. I have added such line in /etc/sysctl.conf on both the router side and the server side. net.ipv4.tcp_fastopen = 3 And then on both side ran "sysctl -p" and rebooted.

What did you expect to see?

The TFO function run properly, with no error.

What did you see instead?

The router side said "tcp fast open is not supported on this platform", and then exit. I have to disable TFO to run it.

What is your config in detail (with all sensitive info masked)?

I generated the config using luci-app-shadowsocks, and I'm sure it has no problem.

The kernel version of my router is 3.14.79 The TFO function worked perfectly when I was using the previous version (3.1.1). What should I do for the TFO function? Does a recompilation using the PandoraBox's native toolchain work?

xsm1997 commented 6 years ago

Just tried it, I can't get it solved by recompiling shadowsocks-libev 3.1.2 using the native PandoraBox SDK. I rollback to version 3.1.1 and it provides no error. But I'm not sure whether the TFO function is working properly or not, because there is no significant speed improvement nor error.

xsm1997 commented 6 years ago

Sorry, I just closed the issue by mistake.

madeye commented 6 years ago

There is a runtime check for TFO. So the error means your kernel may have issues with TFO support.

wongsyrone commented 6 years ago

There is a runtime check for TFO

In fact, it's just compile-time check, make sure the kernel header embedded in your SDK or toolchain matches the one in use.

xsm1997 commented 6 years ago

So how to bypass the compile time check? Just define it in the source code? It seems the kernel is a modified version, and don't have the code defined.