Граф коммитов

32 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 14dbfcaa29 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in netwerk. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D65496

--HG--
extra : moz-landing-system : lando
2020-03-06 09:22:49 +00:00
Eric Rahm 2c08316c5d Bug 1610070 - Part 3: Convert the rest of netwerk/ to use UniquePtr. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D60341

--HG--
extra : moz-landing-system : lando
2020-02-11 16:20:08 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Eric Rahm 78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Michal Novotny 5d31cfe04e Bug 1586782 - network ID: get rid of NL_DEBUG_LOG in NetlinkService r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D58347

--HG--
extra : moz-landing-system : lando
2019-12-28 14:42:03 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Michal Novotny b508e7721e Bug 1600811 - network ID: use hardcoded IP for route checking in nsNetworkLinkService on MacOS r=JuniorHsu
The preferences network.netlink.route.check.IPv4 and network.netlink.route.check.IPv6 were removed in bug 1593693 and the values are now hardcoded because they are used by Linux/Android implementation of nsNetworkLinkService for link status detection and they are not supposed to be changed by the user.

Differential Revision: https://phabricator.services.mozilla.com/D55587

--HG--
extra : moz-landing-system : lando
2019-12-03 07:26:07 +00:00
Valentin Gosu 0848f9ba9a Bug 1590528 - Call CheckAdaptersAddresses at startup r=kershaw
The problem is that the suffix is not always computed when Firefox starts up.
This patch adds a pref `network.notify.initial_call` that controls whether
CheckAdaptersAddresses gets called imediately after.
This call is necessary in order to compute the suffix list, VPN status, etc.

This patch also ensures that OnDnsSuffixListUpdated gets called by
NetlinkService::ComputeDNSSuffixList on Android. This notification is
necessary for the TRRService to pick up the suffix list.

Differential Revision: https://phabricator.services.mozilla.com/D55303

--HG--
extra : moz-landing-system : lando
2019-12-02 09:34:14 +00:00
Kershaw Chang 0e741f1658 Bug 1598676 - P2: Send dns suffix list updated event (Windows/Linux/Android) r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D54901

--HG--
extra : moz-landing-system : lando
2019-11-27 11:14:44 +00:00
Michal Novotny c42d0ce790 Bug 1596419 - Network change event can be hidden by coalescing period on Linux/Android r=valentin
This patch makes network change event different from network ID change event on Linux and Android. Network change event is now also sent when any address has been added, removed or changed.

Differential Revision: https://phabricator.services.mozilla.com/D53796

--HG--
extra : moz-landing-system : lando
2019-11-20 11:56:13 +00:00
Michal Novotny a012999a15 Bug 1589447 - Add network id change event on Linux and Android, r=kershaw,valentin
This patch adds network ID change event to Linux and Android. On these platforms network ID change event is equal to network change event.

Differential Revision: https://phabricator.services.mozilla.com/D50391

--HG--
extra : moz-landing-system : lando
2019-11-14 13:37:50 +00:00
Michal Novotny 2d153a80d4 Bug 1593693 - nsINetworkLinkService.isLinkUp returns true when no network connection is available, r=valentin
Determining link status from states and addresses of the individual interfaces isn't always reliable. With this patch we assume the link is up when we could find a route for kRouteCheckIPv4 host or kRouteCheckIPv6 host.

Differential Revision: https://phabricator.services.mozilla.com/D52027

--HG--
extra : moz-landing-system : lando
2019-11-07 15:16:36 +00:00
Ciure Andrei e16f37061a Backed out changeset 755655b3175a (bug 1593693)for causing NetlinkService.cpp build bustages CLOSED TREE 2019-11-07 15:40:49 +02:00
Michal Novotny a85ff06ef1 Bug 1593693 - nsINetworkLinkService.isLinkUp returns true when no network connection is available, r=valentin
Determining link status from states and addresses of the individual interfaces isn't always reliable. With this patch we assume the link is up when we could find a route for kRouteCheckIPv4 host or kRouteCheckIPv6 host.

Differential Revision: https://phabricator.services.mozilla.com/D52027

--HG--
extra : moz-landing-system : lando
2019-11-07 11:45:13 +00:00
Michal Novotny 787ca4f17b Bug 1593658 - network ID: Fix detecting mobile data link on some Android versions, r=valentin
When we fail to detect the link as mobile data device, we use GW address for ID calculation. And because GW changes often in case of mobile data we often get different ID for the same network.

Differential Revision: https://phabricator.services.mozilla.com/D51612

--HG--
extra : moz-landing-system : lando
2019-11-04 19:45:49 +00:00
Narcis Beleuzu 9e239f2b4a Backed out 2 changesets (bug 1589461, bug 1589447) for wpt failures on report-only-in-meta.sub.html
Backed out changeset e58350a47d50 (bug 1589461)
Backed out changeset abdcdc97cd4c (bug 1589447)
2019-10-29 19:05:09 +02:00
Michal Novotny 9f3a7ca5a2 Bug 1589447 - Add network id change event (linux), r=kershaw
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
2019-10-29 09:37:58 +00:00
Michal Novotny 02ec9a0a47 Bug 1590250 - network ID: different ID is detected after re-enabling mobile data, r=valentin
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
2019-10-23 13:17:46 +00:00
Valentin Gosu fe3c993ae7 Bug 1588219 - Expose DNS suffix list (Linux) r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49414

--HG--
extra : moz-landing-system : lando
2019-10-22 19:46:28 +00:00
Michal Novotny d206228f78 Bug 1586731 - network ID: drop routes/addresses when link/address is removed by the kernel, r=valentin
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
2019-10-08 13:05:42 +00:00
Razvan Maries c748295700 Backed out changeset fbc6bf62b19d (bug 1586731) for perma fails on nsAutoPtr.h. CLOSED TREE 2019-10-08 15:44:06 +03:00
Michal Novotny e16c1f2400 Bug 1586731 - network ID: drop routes/addresses when link/address is removed by the kernel, r=valentin
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
2019-10-08 12:08:15 +00:00
Michal Novotny 3b3f253dd6 Bug 1585920 - network ID: fix VPN detection on Linux for non ethernet devices, r=valentin
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
2019-10-07 14:34:38 +00:00
Michal Novotny 7cb94b9058 Bug 1584089 - Use only global routes for network ID calculation, r=valentin
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
2019-10-01 12:58:18 +00:00
Michal Novotny e994509c2a Bug 1583204 - No Network ID is available when switching between WiFi and Lan networks, r=valentin
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
2019-09-25 12:38:20 +00:00
Michal Novotny 815ac794a5 Bug 1561944 - Implement nsINetworkLinkService.networkID for Android r=valentin
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
2019-09-19 13:47:46 +00:00
Michal Novotny 19c05de902 Bug 1576826 - Intermittent Assertion failure: isResponse, at NetlinkService.cpp:613, r=kershaw
Obviously broadcasted messages can be multipart too.

Differential Revision: https://phabricator.services.mozilla.com/D43849

--HG--
extra : moz-landing-system : lando
2019-08-29 12:08:53 +00:00
Michal Novotny 390918caab Bug 1567616 - network id based on default gateway is wrong when VPN overrides default gateway by more specific routes r=dragana
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
2019-08-26 21:46:32 +00:00
Andreea Pavel f042d32425 Backed out changeset 22469090e93e (bug 1567616) for build bustages on a CLOSED TREE
--HG--
rename : netwerk/system/linux/nsNetworkLinkService.cpp => netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
rename : netwerk/system/linux/nsNetworkLinkService.h => netwerk/system/linux/nsNotifyAddrListener_Linux.h
2019-08-27 00:30:40 +03:00
Michal Novotny 128254f45e Bug 1567616 - network id based on default gateway is wrong when VPN overrides default gateway by more specific routes r=dragana
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
2019-08-26 20:03:33 +00:00