Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on VPN reconfiguration: failed to bind TUN pcb #1634

Closed
ameshkov opened this issue Dec 4, 2017 · 3 comments
Closed

Error on VPN reconfiguration: failed to bind TUN pcb #1634

ameshkov opened this issue Dec 4, 2017 · 3 comments
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

ameshkov commented Dec 4, 2017

Customer ID: 1660692

13:03:16.378 [pool-1-thread-1] INFO  c.a.android.vpn.AdguardVpnService - Success building vpn interface
13:03:16.380 [pool-1-thread-1] ERROR Native.TCPIP.TCPRAW - init: failed to bind TUN pcb
13:03:16.381 [pool-1-thread-1] ERROR Native.TCPIP.TCPMNGR - tcp raw initialization has failed
13:03:16.381 [pool-1-thread-1] ERROR Native.TCPIP.API - open: failed
13:03:16.381 [pool-1-thread-1] INFO  com.adguard.android.ServiceManager - ServiceManager handle status event: VPN_CONFIG_ERROR
13:03:16.423 [pool-1-thread-1] INFO  com.adguard.android.service.bb - Updating widgets for VPN_CONFIG_ERROR protection
13:03:16.442 [pool-1-thread-1] ERROR c.a.a.f.vpn.FilteringVpnService - Error building vpn interface

java.lang.RuntimeException: Can't create tcpip context
	at com.adguard.corelibs.tcpip.NativeTcpIpStackImpl.init(Native Method) ~[na:0.0]
	at com.adguard.corelibs.tcpip.NativeTcpIpStackImpl.<init>(Unknown Source) ~[na:0.0]
	at com.adguard.android.filtering.vpn.FilteringVpnService.d(Unknown Source) ~[na:0.0]
	at com.adguard.android.filtering.vpn.FilteringVpnService.c(Unknown Source) ~[na:0.0]
	at com.adguard.android.filtering.vpn.FilteringVpnService$3.run(Unknown Source) ~[na:0.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) ~[na:0.0]
	at java.util.concurrent.FutureTask.run(FutureTask.java:237) ~[na:0.0]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) ~[na:0.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) ~[na:0.0]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) ~[na:0.0]
	at java.lang.Thread.run(Thread.java:762) ~[na:0.0]
@sfionov sfionov self-assigned this Dec 4, 2017
@sfionov
Copy link
Member

sfionov commented Dec 5, 2017

Found what the problem is. It can only happen if there are time-wait connections with destination port matching our internal reserved port number. Reserved port number is not used at runtime, only at init phase to correctly add callbacks to LWIP.

@sfionov
Copy link
Member

sfionov commented Dec 5, 2017

Fixed in CL 1.0.24

@ameshkov ameshkov added this to the 2.11 milestone Dec 6, 2017
@ameshkov
Copy link
Member Author

@sfionov sfionov closed this as completed Feb 9, 2018
@vozersky vozersky reopened this Mar 2, 2018
@vozersky vozersky closed this as completed Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants