Closed Bug 1253488 Opened 9 years ago Closed 9 years ago

Platform returns incorrect network status, even disable connection the offline flag still be false

Categories

(Firefox OS Graveyard :: Gaia::TV, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mlien, Unassigned)

References

Details

(Whiteboard: [ft:conndevices])

[Blocking Requested - why for this release]: Move This is a follow up bug from bug 1250804, gaia will detect platform's offline signal to show different offline/error strings. In Linux, sometimes even disable network connection, the offline flag still not be set to true.
blocking-b2g: 2.5? → ---
Hi Kershaw, this issue is what we discussed before, platform will return different values while offline
I think this problem is only appeared on ubuntu due to the ways that ubuntu's NetworkManager applet used to disable the network connection. There are two ways to disable network as [1] shows. 1. Select the disconnect item directly. In my PC, this just remove the INET address of eth0, but INET6 address still exists. However, my PC has no network connection at this moment. Since INET6 address is still available, nsIOService only gets NS_NETWORK_LINK_DATA_CHANGED notification and mConnectivity is still true. 2. Uncheck "Enable Networking". This removes the network interface entirely. So, nsIOService can get NS_NETWORK_LINK_DATA_DOWN. mConnectivity is false now. @Daniel, do you think whether we should handle the case 1 I mentioned above? Thanks. [1] http://lh4.ggpht.com/_1QSDkzYY2vc/TPQFwUY-KJI/AAAAAAAACXE/NzO_5ataJkg/s2000/network-manager-applet.png
Flags: needinfo?(daniel)
OS: Gonk (Firefox OS) → Linux
Hardware: ARM → All
We've struggled with this several times in the past and I'm sure we have reasons to continue beating our foreheads against this problem. The key to the problem is this: What exactly does "offline" mean? Depending on who you ask and on what platform and network situation that person is, the answer tends to vary. We have not yet been able to come to a better definition than this: "online" means that there is a network interface up and running that isn't a loopback device. It is online in the sense that you can (probably) communicate with other systems over one or more of the network interfaces. "offline" is thus the reverse: there's no available network interface for communicating. The Linux-specific code for checking offline status does not use the network manager, it just looks through the actual available network interfaces as the kernel provides and checks their status and properties. A network-manager can then of course still affect things if it changes the UP/DOWN state of interfaces for example. For the case (1) as described above, I figure we _can_ add a check for a "non-working IPv6 system" (exactly how to detect that reliable can probably be debated) without available IPv4 addresses in the network interfaces, so that we can exclude them from getting counted as "online" interfaces. Would that improve things for you and do you think it would be a worthwhile change?
Flags: needinfo?(daniel)
(In reply to Daniel Stenberg [:bagder] from comment #4) > We've struggled with this several times in the past and I'm sure we have > reasons to continue beating our foreheads against this problem. > > The key to the problem is this: > > What exactly does "offline" mean? > > Depending on who you ask and on what platform and network situation that > person is, the answer tends to vary. > > We have not yet been able to come to a better definition than this: > > "online" means that there is a network interface up and running that isn't a > loopback device. It is online in the sense that you can (probably) > communicate with other systems over one or more of the network interfaces. > > "offline" is thus the reverse: there's no available network interface for > communicating. > > The Linux-specific code for checking offline status does not use the network > manager, it just looks through the actual available network interfaces as > the kernel provides and checks their status and properties. A > network-manager can then of course still affect things if it changes the > UP/DOWN state of interfaces for example. > > For the case (1) as described above, I figure we _can_ add a check for a > "non-working IPv6 system" (exactly how to detect that reliable can probably > be debated) without available IPv4 addresses in the network interfaces, so > that we can exclude them from getting counted as "online" interfaces. > > Would that improve things for you and do you think it would be a worthwhile > change? Thanks for the detail explanation. Since the pref "network.offline-mirrors-connectivity" is false, users always see the error message "Server not found" for both cases. So, I think it's not worth to do this right now. @Mike, what do you think?
Flags: needinfo?(mlien)
(In reply to Kershaw Chang [:kershaw] from comment #5) > (In reply to Daniel Stenberg [:bagder] from comment #4) > > We've struggled with this several times in the past and I'm sure we have > > reasons to continue beating our foreheads against this problem. > > > > The key to the problem is this: > > > > What exactly does "offline" mean? > > > > Depending on who you ask and on what platform and network situation that > > person is, the answer tends to vary. > > > > We have not yet been able to come to a better definition than this: > > > > "online" means that there is a network interface up and running that isn't a > > loopback device. It is online in the sense that you can (probably) > > communicate with other systems over one or more of the network interfaces. > > > > "offline" is thus the reverse: there's no available network interface for > > communicating. > > > > The Linux-specific code for checking offline status does not use the network > > manager, it just looks through the actual available network interfaces as > > the kernel provides and checks their status and properties. A > > network-manager can then of course still affect things if it changes the > > UP/DOWN state of interfaces for example. > > > > For the case (1) as described above, I figure we _can_ add a check for a > > "non-working IPv6 system" (exactly how to detect that reliable can probably > > be debated) without available IPv4 addresses in the network interfaces, so > > that we can exclude them from getting counted as "online" interfaces. > > > > Would that improve things for you and do you think it would be a worthwhile > > change? > > Thanks for the detail explanation. > > Since the pref "network.offline-mirrors-connectivity" is false, users always > see the error message "Server not found" for both cases. So, I think it's > not worth to do this right now. > > @Mike, what do you think? Agree with you
Flags: needinfo?(mlien)
(In reply to Mike Lien[:mlien] from comment #6) > (In reply to Kershaw Chang [:kershaw] from comment #5) > > (In reply to Daniel Stenberg [:bagder] from comment #4) > > > We've struggled with this several times in the past and I'm sure we have > > > reasons to continue beating our foreheads against this problem. > > > > > > The key to the problem is this: > > > > > > What exactly does "offline" mean? > > > > > > Depending on who you ask and on what platform and network situation that > > > person is, the answer tends to vary. > > > > > > We have not yet been able to come to a better definition than this: > > > > > > "online" means that there is a network interface up and running that isn't a > > > loopback device. It is online in the sense that you can (probably) > > > communicate with other systems over one or more of the network interfaces. > > > > > > "offline" is thus the reverse: there's no available network interface for > > > communicating. > > > > > > The Linux-specific code for checking offline status does not use the network > > > manager, it just looks through the actual available network interfaces as > > > the kernel provides and checks their status and properties. A > > > network-manager can then of course still affect things if it changes the > > > UP/DOWN state of interfaces for example. > > > > > > For the case (1) as described above, I figure we _can_ add a check for a > > > "non-working IPv6 system" (exactly how to detect that reliable can probably > > > be debated) without available IPv4 addresses in the network interfaces, so > > > that we can exclude them from getting counted as "online" interfaces. > > > > > > Would that improve things for you and do you think it would be a worthwhile > > > change? > > > > Thanks for the detail explanation. > > > > Since the pref "network.offline-mirrors-connectivity" is false, users always > > see the error message "Server not found" for both cases. So, I think it's > > not worth to do this right now. > > > > @Mike, what do you think? > > Agree with you Thanks. I would like to close this bug as WONTFIX. If anyone think we should fix this, feel free to reopen this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.