| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the clatd control plane has been moved to mainline
ClatCoordinator, netd/ClatdController is not required anymore.
1. Delete ClatdController files
ClatdController.cpp
ClatdController.h
ClatdControllerTest.cpp
2. Deprecate clatd binder calls
NetdNativeService::clatdStart
NetdNativeService::clatdStop
New tests (some of them use java mock test) partial cover removed
tests. We are going to have a clat integration test to cover more
native behavior.
Test changes:
ClatdControllerTest::SelectIpv4Address -> ClatUtils::SelectIpv4Address
ClatdControllerTest::MakeChecksumNeutral -> ClatUtils::MakeChecksumNeutral
ClatdControllerTest::DetectMtu -> ClatUtils::DetectMtu
ClatdControllerTest::ConfigureTunIpManual
-> ClatCoordinatorTest::testStartStopClatd (only mock test)
ClatdControllerTest::ConfigureIpv6Address
-> ClatCoordinatorTest::testStartStopClatd (only mock test),
ClatUtils::ConfigurePacketSocket
New test path:
packages/modules/Connectivity/service/native/libs/libclat/clatutils_test.cpp
packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java
Bug: 212345928
Bug: 215655463
Test: cd system/netd; atest
Original change: https://android-review.googlesource.com/c/platform/system/netd/+/2072829
Merged-In: Ie2c341f943f9f383f42d6333abb594997085e7a1
Change-Id: Ie2c341f943f9f383f42d6333abb594997085e7a1
Signed-off-by: Nucca Chen <nuccachen@google.com>
(cherry picked from commit bbdea2d15cf8e1f6ce3ff44d2b3459930be5c313)
|
| |
|
|
|
|
|
|
|
|
| |
Add MDnsEventReporter to store the event listener which
register from MDnsService. And they are used to report
mdns event callback.
Bug: 209894875
Test: cd system/netd ; atest
Change-Id: I5f16f57fd0a859b86c888555d6a00d98a646bc1c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Register MDnsService as a native system service "mdns" which
can be used by NsdService to commnuicate with mdnsresponder.
This service is used to replace the NDC design between
NsdService and MDnsSdListener.
- A binder call interface for calling to MDnsSdListener.
- Move checkAnyPermssion() to BinderUtil.h which can be used by
any component.
Bug: 209894875
Test: cd system/netd ; atest
Change-Id: I3543c0ac8ac8da0030ad05baef4d0847730fcae8
|
| |
|
|
|
|
|
|
|
|
|
| |
The work in TrafficController has been moved to the connectivity
mainline module.
Bug: 202086915
Test: cd system/netd; atest
Test: atest FrameworksNetTests FrameworksNetIntegrationTests
TrafficStatsTest CtsHostsideNetworkTests
Change-Id: Ia67bc4ad3d935ae275475cf3ee59436632e1f74b
|
| |
|
|
|
|
|
|
| |
They are already under the same namespace.
Test: presubmit
Bug: 219872355
Change-Id: I05f95ca05b164b193be4f58053fe670eebb8df19
|
| |
|
|
|
|
|
|
|
| |
Removing all callers except dump, which is not implemented in mainline
yet. Remove NetdBinderTest#TestInternetPermission as well, since the
binder interface is no longer being supported.
Test: builds and boots
Change-Id: I45fbceee721ec0cf46e722cdf048b1d1e5562bca
|
| |
|
|
|
|
|
|
| |
Rename DEFAULT_SUB_PRIORITY to SUB_PRIORITY_HIGHEST and
LOWEST_SUB_PRIORITY to SUB_PRIORITY_LOWEST.
Test: builds
Change-Id: Ic62ad37d8bb2fafa488589e2e25f8c890c5dd649
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This is a preparation change for separating routing for the
bypassable VPN network. The routing will need to be updated
depending on whether the local traffic is excluded in the VPN
network. This member is expected to be used in VPN network
only, so add it in the VirtualNetwork, instead of Network.
Bug: 184750836
Test: cd system/netd ; atest
Change-Id: I0aac077c0ab82df1da0cf7db82f99210485b6ff1
|
| |
|
|
|
|
|
|
|
| |
TrafficController.
Test: m; flash; boot
Test: atest InterfaceControllerTest TrafficControllerTest
Test: atest XfrmControllerTest netd_integration_test
Change-Id: I0dd7e2a94743ac03235db35f4e40338c19fd5403
|
| |
|
|
|
|
|
|
| |
TrafficController.
Test: m; flash; boot
Test: atest FirewallControllerTest TrafficControllerTest
Change-Id: I0a8f3f2e9c1f4510021570e7894a56e4998f3ede
|
| |
|
|
| |
Change-Id: Ia7ce4ca3783996eff885c09d0d2a8e155bb140f0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Network preference per-profile and OEM network preferences can't be set
at the same time, because it is unclear what should happen if both
preferences are active for one given UID. Therefore, it needs a
parameter for ConnectivityService to specify which preference is prior
to others.
In this commit:
1. Adds a pair of methods with parcelable parameter, which currently
includes netId, UID range array and subsidiary priority.
2. The subsidiary priority will be used to adjust the original IP rule
priority. UID ranges can applies to different network with different
subsidiary priority. But a single UID should not apply to multiple
networks with the same subsidiary priority.
3. The possible value of subsidiary priority for physical and
unreachable networks is 0-999. 0 is the highest priority. 0 is also
the default value. Virtual network supports only the default value.
4. Netd and its tests reference to latest AIDL version (unstable).
Bug: 182460808
Test: m; flash; cd system/netd/; atest
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Change-Id: I94e8830d0a21ffcca17757fe4783a4be9438c8b4
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
OEMs need VPN type information in Netd for customization. According to
stable AIDL rules, Netd can neither extend parameters in the existing
networkCreateVpn, nor add a new API with the identical name (function
overloading). Thus, add an extensible API which can create physical
network, virtual network, and so on. Deprecate networkCreatePhysical
and networkCreateVpn.
Bug: 171872481
Test: atest
Change-Id: I9094593c902d91d90a8210960c608f0a50f163ff
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a preparation to remove tetherOffload* binder calls:
tetherOffloadRuleAdd
tetherOffloadRuleRemove
tetherOffloadGetStats
tetherOffloadSetInterfaceQuota
tetherOffloadGetAndClearStats
Disable two NetdBinderTest test cases and consider removing them:
TetherOffloadForwarding
TetherOffloadRule
Test: atest netd_integration_test
Change-Id: Idc17aa78cd4293d3b8f8bccfc349b5b99ee7d6a1
|
| |
|
|
|
|
|
|
|
| |
There is no need to convert uids to strings anymore now that iptables
are being removed.
Test: atest netd_unit_test
Bug: 167500195
Change-Id: Ida0d8aea937c50fe40970eacb01f24485c0a59ad
|
| |
|
|
|
| |
Test: atest
Change-Id: I0349e012499f7e2e7ae39809922d0a362cb1a2ae
|
| |
|
|
|
|
|
|
|
|
| |
AIDL gen_log now passes a struct rather than a JSON object so that the
build artifacts become smaller and more efficient.
Bug: 172188290
Test: m
Test: atest netd_integration_test
Change-Id: I927adedc73660503459610fcd4508f0d07d18245
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename these to allowlist and denylist.
This change is mostly automatically generated with:
sed -i 's/WHITE/ALLOW/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/white/allow/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/BLACK/DENY/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/black/deny/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/White/Allow/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
sed -i 's/Black/Deny/g' server/*.{cpp,h} libnetdbpf/{*.cpp,/include/netdbpf/*.h} bpf_progs/*.[ch]
plus manual changes to FirewallController.h and NdcDispatcher.cpp
to make them continue to use INetd::FIREWALL_WHITELIST and
INetd::FIREWALL_BLACKLIST.
INetd (and FIREWALL_WHITELIST and FIREWALL_BLACKLIST) are not
being fixed in this change because doing so would require
changing frozen AIDL files, which is a more complex undertaking.
Also manually change occurrences in the test.
Finally, fix some formatting errors found by clang-format, and
some errors such as "a allowlist" (should be "an allowlist") or`
"allowspace" (should be "whitespace").
Bug: 161896447
Test: atest netd_unit_test netd_integration_test
Test: crosshatch builds, boots, no IptablesRestoreController errors in logs
Change-Id: I3f5b864686651134a50e90b28fc9914bfa3f9a8e
|
| |
|
|
|
|
|
|
|
| |
Provide binder calls for getting tethering statistics and clear the
stats for the given upstream.
Bug: 150736748
Test: None
Change-Id: I7bb635ee39d658961cd9515cc37e23bc3f0cd38f
|
| |
|
|
|
|
|
|
|
| |
Provide binder calls for setting the limit for the given upstream
interface.
Bug: 150736748
Test: atest
Change-Id: I5def133022ee0ae232972c9ccffccd041b4b47a6
|
| |\
| |
| |
| |
| |
| | |
* changes:
Add com.android.tethering to be netd_aidl_interface's apex user
Add binder call tetherOffloadGetStats
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This binder call is separated from the existing call tetherGetStats
and used for for BPF tether stats.
Note that the default value of ifIndex of TetherStatsParcel.aidl is
applied for backward compatibility because it is added from this
commit.
Make netd modules to use netd_aidl_interface-unstable-cpp.
Both netd and libnetd_server use unstable aidl for new api
tetherOffload* and modified parcel TetherStatsParcel.
Generated with:
m netd_aidl_interface-update-api
Bug: 150736748
Test: atest
Change-Id: Ie03834bc40992a4abdc8ef70150569982092b386
|
| |/
|
|
|
|
|
|
|
|
|
| |
0. Move NETID_USE_LOCAL_NAMESERVERS definition to DnsResolver
1. Create libnetdbinder_utils shared to DnsResolver
2. Use dnsproxyd_protocol_headers for NETID_USE_LOCAL_NAMESERVERS
Bug: 151895202
Test: build
Change-Id: I5315f5214bc7cd399e878b96a06f486dc8e4b874
Merged-In: I5315f5214bc7cd399e878b96a06f486dc8e4b874
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defining stable AIDL IPCs with primitive args is not future-proof
because AIDL does not support method overloading, so any time a
parameter is added a new method needs to be created.
It's better to use parcelables for parameters instead, because
parcelables can be extended in subsequent version.
Define a TetherOffloadRuleParcel data structure to represent
tethering offload rules, and switch the tethering offload IPCs to
it before we freeze the INetd AIDL.
Bug: 140541991
Test: atest netd_integration_test
Change-Id: I6e84b14872d38a897eb6a10fd37d816ec7e6da64
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Checking permissions requires a binder IPC to the system server.
There is cross process dead lock due to binder thread exhaustion.
1. Nework stack fired a IPC to netd.
2. Netd reqired binder IPC to check permission but no free binder
thread.
3. System server is waiting the resulting call in netd.
Fix this by not checking mainline_network_stack permission if the
caller is network stack.
Bug: 149766727
Test: ON/OFF hotspot
Change-Id: I9715fa0cb7c1157d134279717222dadedf0268c5
|
| |/
|
|
|
|
|
|
|
| |
PERM_CONNECTIVITY_INTERNAL is deprecated.
Use PERM_NETWORK_STACK instead. Also some trivial cleanup.
Bug: 150749456
Test: atest
Change-Id: Idcd262b010ae1ccafd4af950779d385cc0c559b4
|
| |
|
|
|
| |
Test: None
Change-Id: Idcb6b9c80de499fafb29e4e8b9202d7b7386340c
|
| |
|
|
|
| |
Test: manual
Change-Id: I56834d4dd8afa49460e4e02e084b4f268a51d3fe
|
| |
|
|
|
|
|
|
|
|
| |
- Route may include optional MTU parameter
- Change route is added so routes don't need to be deleted then re-added
- Add/Del/Change functions to pass route info as parcel
Bug: 142892223
Test: new unit tests
Change-Id: Idc32ecb0520b1f4136b3fe0e3f7b6800fb3005a6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tetherStartWithConfiguration doesn't take a configuration, it
takes a boolean. But for extensibility purposes, it should
take some sort of configuration parcel. This is because in
AIDL, once we add a method we cannot ever change its signature
or add parameters, because there cannot be two methods with the
same name. Create a new parcel to improve this.
Bug: 145777247
Test: atest FrameworksNetTests
Test: atest netd_integration_test:BinderTest#TetherStartStopStatus
Test: build, flash, on/off tethering
Change-Id: I0d34a25fc9a187e218d37a058b8316ea2423a5da
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NetworkStack will use the tcp info queried from kernel to
diagnose internet health. The diagnosis should only focus on
specific network, e.g. default network. NetworkStack needs a way
to filter the target network. The only identifier is the fwmark
value for each socket. The fwmark calculation may be modified
in native and may not sync with NetworkStack. Thus, NetworkStack
will need a way to get the netId mask and the network fwmark to
know the network information contained in the fwmark. Expose this
function to ensure the fwmark implementation is aligned wih netd.
Bug: 130325409
Test: cd system/netd; atest
Change-Id: I52fba39e041490016224beffb273693e64ce4338
|
| |
|
|
|
|
|
|
| |
Bugs: 128782815
Test: built, flashed, booted
cd systen/netd && atest
Change-Id: Id72341885d828e30296f20590c64ff614df63cee
|
| |
|
|
|
|
|
|
|
|
| |
include libnetd_client_headers explicitly
Bug: 135235267
Test: m
cd system/netd && atest
Change-Id: Iaeff2072ad0dcab8e42429cc4ae21f2dc3618004
|
| |
|
|
|
|
|
| |
Bug: 135235267
Test: m
cd system/netd && atest
Change-Id: Ibe1dc22a2f3b762f10475e135613a9030bbe28b4
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1. enable gen_log in DnsResolverService
2. fix style problems in DnsResolverService
3. fix potential log_func register bug which is service is registered earlier
than logFunc in NetdNativeService
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: Ib046b52065f894cd5bac0c9c905b85352556a48d
|
| |
|
|
|
|
|
|
|
|
|
| |
It is a template OemNetdListener that OEM could extend their
binder interface based on it.
Bug: 120251561
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: Ida29af3f970f65fafc733617ac091747fe10eb11
|
| |
|
|
|
|
|
|
|
|
| |
OEM could get their customized OemNetd binder by this method
Bug: 120251561
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: I40696573c99798cab609816675ec9070d1311b91
|
| |
|
|
|
|
|
|
|
| |
This effectively makes ClatdController single threaded.
Which makes things nice and simple.
Test: atest libbpf_android_test libnetdbpf_test netd_integration_test netd_unit_test netdutils_test resolv_integration_test resolv_unit_test
Bug: 65674744
Change-Id: I352761b6c44c17f9ea0897ea821a826f642659d5
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
To protect stats map from overflow, netd need to know how many stats
entries exist in the current live stats map when tagging the socket. To
prevent racing against framework stats reading actions during tagging
sockets, let netd handle the map swap action instead.
Bug: 111441138
Test: android.app.usage.cts.NetworkUsageStatsTest
android.net.cts.TrafficStatsTest
Change-Id: I1b63e50a67be07472dba32744c8598c1788d0b75
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a fully-routed VPN is running, we want to prevent normal apps
under the VPN from receiving packets originating from any local non-VPN
interfaces. This is achieved by using eBPF to create a per-UID input
interface whitelist and populate the whitelist such that all
non-bypassable apps under a VPN can only receive packets from the VPN's
TUN interface (and loopback implicitly)
This is the Netd part of the change that auguments the existing UidOwner map
to include a new boolean to enable ingress interface filtering as well as
a new field per UID for the whitelisted interface index. The eBPF program
is updated to drop packets according to the ingress interface whitelist map
when present and enabled. This change also exposes two new netd Binder
interfaces to allow ConnectivityService to update the whitelist.
Test: system/netd/tests/runtests.sh
Bug: 114231106
Change-Id: I033c068a350af82023c2bf909e3b3e65d9952b66
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- improve the duration time precision
- add exception code, message and string information
- remove deprecated glog entry for few left functions
logs looks like:
'''
networkAddRoute("::/0", "wlan0", 100, "fe80::fa00:4:fd00:1") <0.15ms>
setTcpRWmemorySize("524288 2097152 8388608", "262144 524288 4194304") <0.21ms>
trafficSetNetPermForUids(3, [1001,1002,1013,1041,1047,10009,10071,10072]) <0.02ms>
firewallReplaceUidChain("fw_standby", "false", []) -> {"true"} <0.03ms>
if specific service exception occurs, also log the exception error code, message and
exception string as below:
networkAddRoute(100, "wlan0", "2401:fa00:4:fd00::/64", "") ->
ServiceSpecificException(64, "Machine is not on the network") <0.14ms>
'''
Bug: 128833454
Test: m -j
Change-Id: I2d9aa777d997452c0ffe195d2e588ff30d0bc500
|
| |
|
|
|
|
|
|
|
|
| |
AIDL compiler changes the type of parameter in log data to array pair.
Accordingly, make Netd logfunc adapt it
Bug: 128833454
Test: m -j
Test: check whether the parameters keeps its insertion order
Change-Id: Iae33b1543f81fdc68ee20588f705f03204c14502
|
| |
|
|
|
|
|
|
|
|
| |
(heavily based on work by Lorenzo Colitti)
Test: atest netd_unit_test, and manually via 'adb shell dumpsys netd'
Bug: 65674744
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0565a0c78bf655d099d68d3462b8eb7cf4e34483
|
| |
|
|
|
|
|
|
|
|
|
| |
1. remove all resolver related commands in netd
2. remove unused API in libnetd_resolv
Bug: 126141549
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: I35ac8f241eebd6284a6a685ef86cd77a1fce4388
|
| |
|
|
|
|
|
|
|
|
|
| |
1. Make DnsProxyListener get DNS64 prefix internally in libnetd_resolv
2. resolver_test uses IDnsResolver instead of INetd for resolver cmds
Bug: 126141549
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: Ic904a3efd42ac4011ddd94ff4344449c9e647ceb
|
| |
|
|
|
|
|
|
|
|
|
| |
Array can be shipped now.
Because arrayValue.asString() raise an exception, change it to
FastWriter
Test: m -j netd
Test: check whether array data in log shows properly
Bug: 127187108
Change-Id: Ie610ea59c499a7e636a21b4e2ff915dc247fac58
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test
1. fix flaky test for TestIpfwdEnableDisableStatusForwarding
2. fix time unit error in binder_test, set retry default
interval as 50ms
3. refine naming in binder_test
Bug: 128533612
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
Change-Id: Ia03d0c30b49cdd233b627cce8bd2f3f05548798e
|
| |
|
|
|
|
|
|
|
|
|
|
| |
resolver related component in libnetd_resolv
needs it to easily print dump log.
Bug: 122564854
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
adb shell dumpsys netd, worked fine
Change-Id: Ic97d5f21b738fc3074e9308f4846191e744ed479
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently NAT64 prefix discovery, which runs in netd, is started
by netd itself when a network is programmed with all-IPv6 DNS
servers. Unfortunately this is not correct because in many cases
we program DNS servers before the network is connected and it's
actually possible to send packets to them.
In general netd does not have enough visibility into network
lifecycle management to decide when to start and stop prefix
discovery. So move it into the framework with the rest of the
464xlat control plane.
This CL removes the automatic start/stop of DNS64 prefix
discovery and adds binder IPCs for the framework to start and
stop it.
Bug: 65674744
Test: system/netd/tests/runtests.sh
Change-Id: I399c236505590690efa5ece3b75b5161a41fcb7d
|