Convert the simplistic blocking read in a separate thread model to
the MessageQueue OnFileDescriptorEventListener model, albeit still
on a separate thread.
Test: as follows
- built
- flashed
- booted
- "runtest frameworks-net" passes
- basic IpManager functions still work,
including ConnectivityPacketTracker
Bug: 62476366
Bug: 67013397
Change-Id: I1f4a6707eba402338947fe3f5392a26660f05714
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
(except for UidRange and APF tests that are missing libvndk)
- regular WiFi STA mode attach works for IPv4-only, dualstack,
and IPv6-only networks
- tethering works with dualstack upstream and downstream
Bug: 62476366
Change-Id: Id807b3091b0b2935b01aeb3644245034312b4183
Add a configurable black for protocols which packets are to be dropped
by APF. This enales an OEM to configure the APF to filter out un-needed
packets from reaching the host
Bug: 62415182
Test: runtest frameworks-net
Merged-In: I86335a0f854d5e83a2b2767978cd69b2cc25c2f8
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
(cherry picked from commit caffbe127726c6a9ab5dd023a9b09cfa43eac617)
Change-Id: I15a758d18464d73d24ba8364a867904bb3cd3b34
This patch changes IpManager to take into account static provisioning
information specified in the InitialConfiguration for IPv6 static
configuration.
When a valid InitialConfiguration with IPv6 content is specified,
IpManager will do the following things:
- at start(), it will push the IPv6 addresses in the config to netd
- it will observe all addresses be notified via Netlink
- when all addresses are there, it will patch in the associated IPv6
routes in the config, so that they get passed to ConnectivityService
through the usual mechanism
The logic triggering onProvisioningSuccess is also changed to take into
account InitialConfiguration: when all addresses and all routes in the
config are seen the provisioning is successful.
Bug: 62988545
Test: runtest frameworks-net, with newly added tests
Change-Id: I77ed7c576c4b198de7a4726be70c78b74689e98b
Since per-file overwrites the directory default, just allowing
build.master@android.com for Android.mk with a per-file rule prevents
the owners of the directory to modify Android.mk files without bypassing
OWNERS check in gerrit.
This patch fixes this issue for Connectivity OWNERS files by explicitly
listing Connectivity members for a few Android.mk files.
Test: build
Change-Id: I9c2a2519c3e7dd27e66334b090e074968b408cbc
in b/37702435 battery was drained due to reception of
Ethernet frames with Eth-type < 0x600 (non ehternet II frames)
This change adds an XML file to drop/allow these frames
Dropping helps tp avoid acquiring a wakelock for the
reception of these packets, while allowing them may be needed
for some protocols
The Change allow the OEM to override the system settings
Bug: 37702435
Test: runtest frameworks-net
Merged-In: Idb6c215896ef230a8136ff4ecefc90ccdc5c1c6d
Merged-In: I16346bb98a0b9259f7c3f51e318c472cfc1bb492
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
(cherry pick from commit 4dd7c58fc8fcc5a2c50de5e8eff05ddc5c3b0b8b)
Change-Id: Ie466baf1e6395d6c28245e41179232ea8e523845
This patch adds a InitialConfiguration class to IpManager for specifying
IP information in IpManager ProvisioningConfiguration at IpManager
startup.
At the moment this InitialConfiguration is not used, but is validated in
startProvsiioning if ProvisioningConfiguration includes one. It will be
integrated into IpManager IP provisioning logic in follow-up patches.
This patch also includes an example of data driven unit tests using a
table of test case. The highlights of this methodology are:
1) easy extensibility for new test case,
2) rich and informative error messages,
Unfortunately Java support for inlined data structure literals is poor
and some companion static methods for data generation are required for
enabling this methodology.
Bug: 62988545
Test: added new test in FrameworksNetTests,
$ runtest frameworks-net
$ runtest frameworks-wifi
Merged-In: I060b02603af7d73a6407df89344bf0c000574af2
(cherry pick of commit 2757fcf3a13b0addc4a168a12c72ac2fc418b012)
Change-Id: I48dbf89232d7758f1b07ed4d76ce93281e5c6b53
This change modifies the RA filter generation code to ignore bytes 1-3
of the IPv6 header. It also updates testApfFilterRa such that it fails
without the updates to ApfFilter.
Test: as follows
- built
- flashed
- booted
- sent RAs from OS X with differing flow labels and observed
that they were filtered
- ApfTest passes
Bug: 31166495
(cherry picked from commit 7006bd4fe5eba4b6fad43dd28d9cad2d26ce140a)
Change-Id: I32153238193ac13a0e59be1875d983a0567c41c7
Introduce a SharedLog that can be shared among all Tethering
components. All log entries go to the same log, and each includes
its subsystem name. Additionally, all entries emitted to the
system log shared the same tag, so can easily be watched.
More subsystems can inherit a SharedLog, but to minimize cherry-pick
conflicts we limit ourselves to these changes only.
Test: as follows
- built
- flashed
- booted
- log output observed via dumpsys
- runtest frameworks-net passes
Bug: 32163131
Bug: 36988090
Bug: 38218697
Change-Id: I1229d4c55987402d84b0d4a2c8a595e0c829aa3e
This patch extracts into BitUtils byte manipulation helper methods
and unsigned type manipulation helper methods from ApfFilter into
an independent and reusable structure.
Test: $ runtest frameworks-net
Change-Id: I0f33af10457a63dbde5983f14353a79b8cd877d9
This allows an application that knows how to provide seamless
network connectivity (e.g., using QUIC multipath) to find out if
doing so is desired.
(cherry picked from commit 2de4925f5cc64aeb92e02a8f740d3ff20f36dddd)
Test: builds, boots, runtest frameworks-net passes.
Bug: 34630278
Change-Id: Ic7fd0b9e1cd879fdfaf84009d7125391895e9087
Direct access to Netd from the bluetooth process is disallowed by
SELinux policy. This change reverts to the old behavior where IpManager
interacts with NetdService indirectly via NetworkManagementService.
Bug: 36492299
This partially reverts commit af39244a34f4449c12a5f925222c9bc8d8049320.
Change-Id: Icf20b1e24abf7dd3123760f8637928bde7afe06b
On second thought, let's set accept_ra_rt_info_m**_plen in
Netd (InterfaceController::initializeAll())
This reverts commit 25870a2c9effd7a7d31c0678c34a6e952b2d56a1.
Change-Id: I22b000623bb852e375385d4aae789d007e84ba3d