Status

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: pgravel, Assigned: vchang)

Tracking

unspecified
2.0 S4 (20june)
x86
Linux
Dependency tree / graph
Bug Flags:
in-moztrap +

Firefox Tracking Flags

(blocking-b2g:1.4+, firefox31 wontfix, firefox32 fixed, firefox33 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)

Details

(Whiteboard: [caf priority: p2][cr 673050], )

Attachments

(3 attachments)

Posted file ipv6tether_ffos.log
USB and wifi tethering cannot be turned on when on an IPv6 connection.

If you look at the attached logs, the failure occurs due to 
 D TetherController: setDnsForwarders(0 = '2620:0:ccc:0:0:0:0:2')
 E TetherController: Failed to parse DNS server '2620:0:ccc:0:0:0:0:2'

This is because netd's TetherController only supports IPv4 DNSes and in gecko's NetworkUtils::setUSBTethering() the data call's IPv6 DNSes are directly passed in to netd. 

As you can see in the second log attaches, Android seems to use the hard-coded DNSes 8.8.8.8 and 8.8.4.4 when toggling on tethering, regardless of the base data call's connection type. (ref: https://android.googlesource.com/platform/frameworks/base/+/master/services/java/com/android/server/connectivity/Tethering.java#1246).
Blocks: 984663
Component: General → Wifi
Please review for WiFi
Flags: needinfo?(kchang)
Whiteboard: [cr 673050]
Chuck, this bug should have been fixed by your patches before, right?
Assignee: nobody → chulee
Flags: needinfo?(kchang)
blocking-b2g: 1.4? → 1.4+
After discussing with Vincent, he can take this bug.
Assignee: chulee → vchang
(In reply to Ken Chang[:ken] from comment #3)
> Chuck, this bug should have been fixed by your patches before, right?

AFAIK, we only deal with wifi but not tethering on IPv6.
The problem here is we set IPv6 info from data call to netd but it doesn't support it.

Hardcode DNS Server to IPv4 seems wired to me.
First, while using IPv4 DNS Server on IPv6 network, I think we also need a ipv4-in-ipv6 tunnel(or some special work in gonk) for the IPv4 DNS query and other IPv4 traffic on IPv6 network. Or we are just making the log looks right but the tethering still fails.
Also, it might break some private services from service provider, if they use some domain name that only can be resolved by the DNS Server from data call.

I suggest we test if force IPv4 DNS Server do make tethering first.
It should be ipv4 address(8.8.8.8/8.8.4.4) if you don't modify the default dns settings for tethering.wifi.dns1/tethering.wifi.dns2. 
http://dxr.mozilla.org/mozilla-central/source/dom/wifi/WifiWorker.js#61

Or do you modify them in https://github.com/mozilla-b2g/gaia/blob/v1.4/build/config/common-settings.json ?
Flags: needinfo?(pgravel)
I haven't touched Gaia. Here's where gecko grabs the DNS from the data call in both the wifi- and usb-tethering cases.
(wifi) http://lxr.mozilla.org/mozilla-central/source/dom/system/gonk/NetworkUtils.cpp#1552
(usb) http://lxr.mozilla.org/mozilla-central/source/dom/system/gonk/NetworkUtils.cpp#1578
Flags: needinfo?(pgravel)
Vincent

ni to answer comment 7
Flags: needinfo?(vchang)
Posted patch Patch v1.0Splinter Review
Prevent setting the ipv6 address to dns forwarder.
Attachment #8434679 - Flags: review?(chulee)
Flags: needinfo?(vchang)
I don't have IPV6 environment right here. Can you help to verify if the patch works for you ?
Flags: needinfo?(pgravel)
Comment on attachment 8434679 [details] [diff] [review]
Patch v1.0

Review of attachment 8434679 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, with a little suggestion. Thanks.

::: dom/system/gonk/NetworkUtils.cpp
@@ +1556,5 @@
>    getIFProperties(GET_CHAR(mExternalIfname), interfaceProperties);
>  
>    if (strcmp(interfaceProperties.dns1, "")) {
> +    int type = getIpType(interfaceProperties.dns1);
> +    if (type != AF_INET6) {

I suggest use |type == AF_INET| in case we got expected network types.
Attachment #8434679 - Flags: review?(chulee) → review+
Vincent

Anything pending for landing here?
Flags: needinfo?(vchang)
Per comment 10, I am waiting for the test result from QC.
Flags: needinfo?(vchang)
https://hg.mozilla.org/mozilla-central/rev/340f8450649e
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
verified behavior is now the same as android. thanks!
Flags: needinfo?(pgravel)
Flags: in-moztrap?(bzumwalt)
New test case needs to be written to address bug.
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
New test case has been written in moztrap:

https://moztrap.mozilla.org/manage/case/14237/
Flags: needinfo?(ktucker)
Flags: in-moztrap?(bzumwalt)
Flags: in-moztrap+
Vincent, can we also get this fixed on v2.0? Thanks!
Flags: needinfo?(vchang)
I think you're looking for a different "vchang" :-)
Flags: needinfo?(vchang)
NI the correct person.
Flags: needinfo?(vchang)
(In reply to Vincent Chang[:vchang] from comment #24)
> I think it's there already. 
> http://hg.mozilla.org/releases/mozilla-b2g32_v2_0/file/692c93509dc9/dom/
> system/gonk/NetworkUtils.cpp#l1560

Thanks!
Whiteboard: [cr 673050] → [caf priority: p2][cr 673050]
Blocks: 1183002
You need to log in before you can comment on or make changes to this bug.