Closed Bug 1018355 Opened 7 years ago Closed 7 years ago

IPv6 tethering failure


(Firefox OS Graveyard :: Wifi, defect)

Not set


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

2.0 S4 (20june)
blocking-b2g 1.4+
Tracking Status
firefox31 --- wontfix
firefox32 --- fixed
firefox33 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed


(Reporter: pgravel, Assigned: vchang)




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


(3 files)

Attached 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 and when toggling on tethering, regardless of the base data call's connection type. (ref:
Attached file ipv6tether_android.log
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( if you don't modify the default dns settings for tethering.wifi.dns1/tethering.wifi.dns2.

Or do you modify them in ?
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.
Flags: needinfo?(pgravel)

ni to answer comment 7
Flags: needinfo?(vchang)
Attached 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+

Anything pending for landing here?
Flags: needinfo?(vchang)
Per comment 10, I am waiting for the test result from QC.
Flags: needinfo?(vchang)
Closed: 7 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:
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. 
> system/gonk/NetworkUtils.cpp#l1560

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.