New issue
Advanced search Search tips

Issue 694860 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

navigator.onLine is false in an IPv6-only environment

Project Member Reported by juangj@google.com, Feb 22 2017

Issue description

Chrome Version: 56.0.2924.87
OS: Ubuntu

What steps will reproduce the problem?
(1) Start Chrome in an environment where AF_INET sockets cannot be created.
(2) Check the value of navigator.onLine in the console.
(3) Please see internal b/34122844 for more precise steps.


What is the expected result?

navigator.onLine should be true, because IPv6 sites are reachable.


What happens instead?

navigator.onLine is false.

This might be expected if DNS is broken, but I believe Chrome still claims to be offline even if DNS is working in the IPv6-only environment.

Even if this behavior is intended (or unintended but difficult to fix), I would appreciate suggestions for workarounds to force Chrome to believe it is online, so that tests running in this environment behave properly.

[CC: pauljensen@chromium.org because this might(?) be related to http://crbug.com/530482, which is a problem we've run up against in tests in the past.)
 
Components: Internals>Network>Connectivity
Labels: OS-Linux
navigator.onLine is generally supposed to represent Internet connectivity, and the Internet is still comprised of many IPv4-only hosts so lack of IPv4 connectivity seems like an acceptable case for navigator.onLine being false, at least for now.

Linux connectivity status is derived from various netlink signals, see https://cs.chromium.org/chromium/src/net/base/network_interfaces_linux.cc  
What does the output of "ip addr" look like in your environment?

Comment 2 by juangj@google.com, Feb 28 2017

Not sure what's OK to share publicly; posted to http://b/34122844 (and CC'ed pauljensen@google.com)
Status: Started (was: Untriaged)
I tracked it down to the fact that in a couple places sockets are opened with AF_INET instead of AF_INET6 simply for performing ioctls, namely in AddressTrackerLinux::GetInterfaceName() and GetInterfaceConnectionType() and GetInterfaceSSID().  Changing these to AF_INET6 fixes the issue.
Project Member

Comment 5 by bugdroid1@chromium.org, May 17 2017

Labels: Merge-Request-59
I think this is a safe change and there seems to be significant demand for it, see http://b/34122844
Project Member

Comment 7 by sheriffbot@chromium.org, May 22 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 8 by bugdroid1@chromium.org, May 22 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff8d76e0fe75b5437b733d6df7892e02234a73bd

commit ff8d76e0fe75b5437b733d6df7892e02234a73bd
Author: Paul Jensen <pauljensen@google.com>
Date: Mon May 22 13:09:39 2017

When creating sockets for ioctl() use AF_INET6 or AF_INET

This fixes issues on IPv6-only linux computers.

BUG= 694860 

Review-Url: https://codereview.chromium.org/2890773002
Cr-Original-Commit-Position: refs/heads/master@{#472556}
Review-Url: https://codereview.chromium.org/2896823002 .
Cr-Commit-Position: refs/branch-heads/3071@{#649}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/ff8d76e0fe75b5437b733d6df7892e02234a73bd/net/base/address_tracker_linux.cc
[modify] https://crrev.com/ff8d76e0fe75b5437b733d6df7892e02234a73bd/net/base/network_interfaces_linux.cc
[modify] https://crrev.com/ff8d76e0fe75b5437b733d6df7892e02234a73bd/net/base/network_interfaces_linux.h

Status: Fixed (was: Started)

Sign in to add a comment