This patch splits network change event into 2 events:
1) network ID change event
It is sent when the calculated ID differs from the previous one.
2) network change event
It is sent when the network ID has changed or when any address has been added, removed or changed.
Differential Revision: https://phabricator.services.mozilla.com/D50391
--HG--
extra : moz-landing-system : lando
For same reason, there are artificial MAC addresses available on some non-ethernet link devices. With this patch we ignore all neighbor messages for non-ethernet links. Also, when traffic for the checked host is routed via rmnet_data device, we skip hashing IP of next hop, because it changes very often in case of some mobile providers.
Differential Revision: https://phabricator.services.mozilla.com/D50184
--HG--
extra : moz-landing-system : lando
Kernel can drop routes, addresses and neighbors without notification via netlink. So we update information in our structures as follows:
- when a link is removed all associated routes, addresses and neighbors are removed too
- when a link is disabled all associated routes and neighbors are removed
- when an address on a link is removed all routes and neighbors from this network are removed
All routes, neighbors and addresses always belong to some link, so a new class LinkInfo was created and it holds all information related to a single link. This makes finding information related to a specific link much easier.
Differential Revision: https://phabricator.services.mozilla.com/D48360
--HG--
extra : moz-landing-system : lando
Kernel can drop routes, addresses and neighbors without notification via netlink. So we update information in our structures as follows:
- when a link is removed all associated routes, addresses and neighbors are removed too
- when a link is disabled all associated routes and neighbors are removed
- when an address on a link is removed all routes and neighbors from this network are removed
All routes, neighbors and addresses always belong to some link, so a new class LinkInfo was created and it holds all information related to a single link. This makes finding information related to a specific link much easier.
Differential Revision: https://phabricator.services.mozilla.com/D48360
--HG--
extra : moz-landing-system : lando
In case of non ethernet device we can never get a MAC address of the next hop, so skip MAC lookup and proceed directly to network ID calculation based on device name and IP/network address.
Differential Revision: https://phabricator.services.mozilla.com/D48049
--HG--
extra : moz-landing-system : lando
Although local link addresses are not routable, some Android versions have default route for such prefix. We need to ignore any non-global routes when calculating ID.
Differential Revision: https://phabricator.services.mozilla.com/D47578
--HG--
extra : moz-landing-system : lando
Bug 1576386 converted the thread into a threadpool, but when changing that it failed to dispatch the runnable to the thread/threadpool as before.
As a result nsNotifyAddrListener stopped listening for network change events on windows.
Differential Revision: https://phabricator.services.mozilla.com/D46932
--HG--
extra : moz-landing-system : lando
There can be multiple records for the same neighbor with different interface index when the computer is connected to the same network via multiple interfaces, e.g. LAN and WiFi. This patch adds interface index to the key, so when some interface goes down it doesn't remove records belonging to a different interface.
Differential Revision: https://phabricator.services.mozilla.com/D47017
--HG--
extra : moz-landing-system : lando
Patch changes nsAndroidNetworkLinkService so it uses NetlinkService for network ID calculation as well as for notifications about network changes.
Differential Revision: https://phabricator.services.mozilla.com/D43385
--HG--
extra : moz-landing-system : lando
The thread calls into some windows APIs that may sometimes block for a long time. Since we're shutting down anyway, it is OK to sometimes leak this thread, similar to what we do for DNS resolver threads.
The patch converts nsNotifyAddrListener::mThread to a nsIThreadPool (with a max of 1 thread) so that we may call shutdownWithTimeout on it.
Differential Revision: https://phabricator.services.mozilla.com/D46002
--HG--
extra : moz-landing-system : lando
Since we sometimes coalesce SendEvents, calling it from there is not actually correct, and sometimes we fail to recompute the networkID when network changes happen.
Differential Revision: https://phabricator.services.mozilla.com/D45331
--HG--
extra : moz-landing-system : lando
This patch implements NetlinkService which communicates with kernel via netlink socket. It keeps track of addresses, default routes, interfaces and neighbors and uses it to calculate network ID.
Differential Revision: https://phabricator.services.mozilla.com/D43175
--HG--
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.cpp => netwerk/system/linux/nsNetworkLinkService.cpp
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.h => netwerk/system/linux/nsNetworkLinkService.h
extra : moz-landing-system : lando
This patch implements NetlinkService which communicates with kernel via netlink socket. It keeps track of addresses, default routes, interfaces and neighbors and uses it to calculate network ID.
Differential Revision: https://phabricator.services.mozilla.com/D43175
--HG--
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.cpp => netwerk/system/linux/nsNetworkLinkService.cpp
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.h => netwerk/system/linux/nsNetworkLinkService.h
extra : moz-landing-system : lando
This patch fixes a bug in ipv4NetworkId where we wrongly hashed IP address instead of MAC address. It also simplifies getMac function. MAC address must be 6 bytes long. If it's not it's probably an error and we must not use it.
Differential Revision: https://phabricator.services.mozilla.com/D39349
--HG--
extra : moz-landing-system : lando
* calculateNetworkId is now called before sending each ChangeEvent
* mNetworkId is truncated when no IPv4/IPv6 IDs could be computed
Differential Revision: https://phabricator.services.mozilla.com/D35780
--HG--
extra : moz-landing-system : lando
* calculateNetworkId is now called before sending each ChangeEvent
* mNetworkId is truncated when no IPv4/IPv6 IDs could be computed
Differential Revision: https://phabricator.services.mozilla.com/D35780
--HG--
extra : moz-landing-system : lando
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)
--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
This was done automatically replacing:
s/mozilla::Move/std::move/
s/ Move(/ std::move(/
s/(Move(/(std::move(/
Removing the 'using mozilla::Move;' lines.
And then with a few manual fixups, see the bug for the split series..
MozReview-Commit-ID: Jxze3adipUh
Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204