Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.34k stars 581 forks source link

Cannot route UDP connections #158

Closed Ghostbird closed 5 years ago

Ghostbird commented 5 years ago

I tried to run a UDP connection between phone and PC using the latest gnirehtet-rust-linux64, but I keep getting this error:

2018-12-02 16:18:39.961 INFO UdpConnection: 10.0.0.2:54702 -> 255.255.255.255:1716 Open
2018-12-02 16:18:39.961 ERROR Router: Cannot create route, dropping packet: Permission denied (os error 13)

I've tried to run the program as root for a few seconds, just to see whether that would fix the issue. (Some ports are reserved for the system and require root in *nix systems, but those are normally ports 1024 and lower iirc) Running as root made no difference.

System: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux Phone: Elephone S7 4/64GB running a custom rooted ROM

For those curious what I was trying to do, I was trying to test the Steam Link BETA app, but my WiFi is too slow.

rom1v commented 5 years ago

Thank you for your report.

Related to https://github.com/Genymobile/gnirehtet/issues/28.

Ghostbird commented 5 years ago

So UDP broadcasts are not supported yet? That's a shame, apparently the Steam Link BETA app relies heavily on it to create a connection between de PC and the device. Sorry for the double report. I did use the search function, but the relevant log in the #28 has the stack trace in French :sob:

Now that I think about it. As far as I understand gnirehtet, it creates a virtual network for the PC and the Android device and then bridges that network to the LAN. Then it makes perfect sense that broadcast is not supported.

Ghostbird commented 5 years ago

Some more messing around with the Steam Link beta app, and it somehow worked after connecting manually by IP, and restarting the app.