Closed
Bug 1139453
Opened 9 years ago
Closed 9 years ago
Linux nsNotifyAddr should detect "offline" when no network interface is UP
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: bagder, Assigned: bagder)
References
Details
Attachments
(1 file, 2 obsolete files)
3.40 KB,
patch
|
bagder
:
review+
|
Details | Diff | Splinter Review |
The nsNotifyAddr logic for Firefox on Linux should work similarly to the Windows backend and signal connectivity based on available network interfaces. If there is a network interface available that is UP and isn't lookback, consider it connected. Outstanding question: should the same logic apply for FxOS ?
Assignee | ||
Comment 1•9 years ago
|
||
Here's a first take to make the Linux version act similar to how we do on Windows. If there's a network interface UP that isn't a loopback, consider the link up. Otherwise down.
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8573217 [details] [diff] [review] 0001-bug-1139453-send-NS_NETWORK_LINK_DATA_UP-DOWN-events.patch Review handed to :valentin with permission from :jduel
Attachment #8573217 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8573217 [details] [diff] [review] 0001-bug-1139453-send-NS_NETWORK_LINK_DATA_UP-DOWN-events.patch Ah, scratch that for now. This patch doesn't build/work for b2g since bionic doesn't have getifaddrs(). Need to deal with that somehow first.
Attachment #8573217 -
Flags: review?(valentin.gosu)
Comment 4•9 years ago
|
||
Take a look at NetworkManager.js which handles up/down for b2g. We could even ignore b2g for the moment and just fix it for Desktop Linux.
Assignee | ||
Comment 5•9 years ago
|
||
Ah yes. I'll add some magic to make it desktop-linux only.
Assignee | ||
Comment 6•9 years ago
|
||
Yeps, here's a version that explicitly doesn't do the checklink on 2bg but does it on Linux.
Attachment #8573217 -
Attachment is obsolete: true
Attachment #8577238 -
Flags: review?(valentin.gosu)
Comment 7•9 years ago
|
||
Comment on attachment 8577238 [details] [diff] [review] v2-0001-bug-1139453-send-network-UP-DOWN-events-on-deskto.patch Review of attachment 8577238 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=valentin with the #ifndef change. ::: netwerk/system/linux/nsNotifyAddrListener_Linux.cpp @@ +108,5 @@ > +{ > + // b2g instead has NetworkManager.js which handles UP/DOWN > +} > +#else > +void nsNotifyAddrListener::checkLink(void) The usual pattern I've seen is void nsNotifyAddrListener::checkLink(void) { #ifndef MOZ_WIDGET_GONK do stuff #endif return default... } This way we only have only definition of this method.
Attachment #8577238 -
Flags: review?(valentin.gosu) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Modified as per review comment. Try-run (v2): https://treeherder.mozilla.org/#/jobs?repo=try&revision=dc7bd9be12cb
Attachment #8577238 -
Attachment is obsolete: true
Attachment #8577260 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 9•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a80860d9add6
Keywords: checkin-needed
Comment 10•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a80860d9add6
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•