Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
VPN kill switch breaks cellular data #744
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
Please test on stock with the same SIM card if you can. |
thestinger
added
upstream
upstream-app
labels
Sep 24, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
thestinger
Sep 25, 2017
Contributor
I think it's supposed to work this way if the VPN doesn't know how to set up a connection over both. If you want to use mobile data you can disable WiFi.
I tried enabling/disabling "Mobile data always active" in Developer options (switched to on when I upgraded to Oreo, is that related to absence of CNEService or upstream change?).
Not related to CNEService.
|
I think it's supposed to work this way if the VPN doesn't know how to set up a connection over both. If you want to use mobile data you can disable WiFi.
Not related to CNEService. |
thestinger
closed this
Sep 25, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
daradib
Sep 26, 2017
With Wi-Fi disabled, it still won't work, e.g., when switching from airplane mode or no cell signal. I have no problems if I enable the kill switch when mobile data is already working.
But same issue on stock, so it's not a Copperhead issue. Probably upstream or OpenVPN client. I'll look into it some more soon.
daradib
commented
Sep 26, 2017
|
With Wi-Fi disabled, it still won't work, e.g., when switching from airplane mode or no cell signal. I have no problems if I enable the kill switch when mobile data is already working. But same issue on stock, so it's not a Copperhead issue. Probably upstream or OpenVPN client. I'll look into it some more soon. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
daradib
Sep 26, 2017
The VPN kill switch prevents Android from adding a default route to the mobile carrier gateway, but not my wifi router.
Excerpt from adb logs - the routing table permission error only shows up when using mobile data with the kill switch:
D ConnectivityService: NetworkAgentInfo [MOBILE (LTE) - 111] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTED
D ConnectivityService: Adding iface rmnet_data0 to network 111
E Netd : Error adding route 0.0.0.0/0 -> 10.[redacted] rmnet_data0 to table 1006: Permission denied
E ConnectivityService: Exception in addRoute for gateway: java.lang.IllegalStateException: command '263 network route add 111 rmnet_data0 0.0.0.0/0 10.[redacted]' failed with '400 263 addRoute() failed (Permission denied)'
[connectivitycheck fails]
$ ip route show table 1006 # on mobile, with kill switch
[empty]
$ ip route show table 1006 # on mobile, without kill switch
default via 10.[redacted] dev rmnet_data0 proto static
$ ip route show table 1005 # on wifi, with or without kill switch
default via [redacted] dev wlan0 proto static
[redacted] dev wlan0 proto static scope link
Good news, looks like we have a fix upstream!
Upstream diff: 463837
Upstream bug: 63662962 (access to view bug is unfortunately restricted)
Now if only Google could make their bugs public.
daradib
commented
Sep 26, 2017
|
The VPN kill switch prevents Android from adding a default route to the mobile carrier gateway, but not my wifi router. Excerpt from adb logs - the routing table permission error only shows up when using mobile data with the kill switch:
Good news, looks like we have a fix upstream! Upstream diff: 463837 Now if only Google could make their bugs public. |
daradib commentedSep 23, 2017
Steps to reproduce:
Wi-Fi and VPN works fine both with/without the VPN kill switch. Mobile data and VPN only work without the VPN kill switch.
I've tried changing APN settings from IPv4/IPv6 to IPv4 only. Network type is "LTE (recommended)" but I've tried "LTE only" (which would break voice for me, no VoLTE) and "3G". I tried enabling/disabling "Mobile data always active" in Developer options (switched to on when I upgraded to Oreo, is that related to absence of CNEService or upstream change?).
If I use the
*#*#4636#*#*secret code, I see:but ping test returns "Unknown". If I change the APN name to something wrong, Data Service changes to Disconnected.
My environment:
I don't see any related bugs filed in the Android tracker.
I can get adb logs or test stock with a friend's phone if you have trouble reproducing.