Due to an issue resolving the boot classpath, the
KeepalivePacketData structure cannot be referenced
by frameworks/opt/telephony while it is in services.
-Move KeepalivePacketData to android.net
-Also, relocate IpUtils without changing the package
name.
Bug: 38350389
Test: compilation
Change-Id: If5fc63e9ad8b9b2d4c2fee47ff4bab2ab190a05a
(cherry picked from commit bd4093be7cab51d6ad031854324134a9c8637c2c)
Also audit all constants, make some private, annotate some
with @VisibleForTesting.
Test: runtest framework && cts
Change-Id: Iaf5ea7abd36fd8d544dcc84654f6cb529196d654
NetworkInterface throws Exceptions every time you look at it askance.
Try to make something we instantiate fully, once, and pass it around.
Partial MacAddress-ification as well, for good measure.
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
- basic IPv6 tethering works
Bug: 32163131
Bug: 62476366
Change-Id: I16c145fddb4e76387370338d792a438eed886d7f
This reverts commit 94209ab7686b202cfad6e42e07056bb9511006a8.
Reason for revert: should not have auto-submitted prior to more extensive wifi team testing.
Change-Id: Ie81b10473caf34971226948038bc20dc4fa6a1ae
Also remove 'build.master@android.com' which is deprecated, not
declared by anybody else, and makes the linter unhappy.
Bug: 70394432
Test: built
Merged-In: I9c0ba41386129379f82259fcc5e745562b014fae
(cherry pick from commit 626eed2ac826a34b3ac9b1d4ddb9a783222187ec)
Change-Id: Ie802113d61f693d73f7234b44ac2a9bd462b3fbf
Additionally, no longer try to transition from within a State's
enter() method (this can encounter Log.wtf()s). Introduce some
CMD_JUMP_* commands and use deferMessage().
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes (except for IpConnectivityMetricsTest failures)
- manual changing from DHCP to static configurations works:
2017-12-11T19:06:19.082 - INVOKE onLinkPropertiesChange({{InterfaceName: wlan0 LinkAddresses: [] Routes: [] DnsAddresses: [] Domains: null MTU: 0}})
Bug: 69800563
Bug: 70394432
Change-Id: Ice249a48b66806c0270ec3f11dd2e8e387d4e29b
See build/soong/README.md for more information.
Test: m checkbuild
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2
Merged-In: I417409281c928ea667d937090d2a0d9d72a449a2
Exempt-From-Owner-Approval: trivial conversion
(cherry-picked from commit e0b2ee52d2f274a2d46b2e6695e42d2764c39fa7)
This reverts commit b3f9f4a30502477e71fc93037dc58080fddb1853.
Reason for revert: Crash in WifiStateMachine (b/70394432)
Change-Id: I3a96c822eddcebcdd6621cee878b865171d094e8
IpReachabilityMonitor (and IpNeighborMonitor) are only accessed from
the IpManager StateMachine's thread. Consequently lots of locking can
now be removed.
Additionally:
- rename BlockingSocketReader to PacketReader
- incorporate IpReachabilityMonitor output in dump()
Test: as follows
- runtest frameworks-net passes
- "adb shell ip neigh change <address> dev wlan0 nud failed"
triggers wifi to disconnect
Bug: 62476366
Bug: 67013397
Change-Id: I18aca29ae0019a72a7e559c2832e0d9b0e33d81e
This patch introduces a helper ApfConfiguration class for passing filter
parameters to the constructor of ApfFilter. The benefits are:
- less parameter boilerplate across IpManager, ApfFilter, ApfTest
- easier to add more parameters in the future (useful for hardware
counters options and further gservices configurable options)
There is no functional changes otherwise.
Test: runtest frameworks-net
Change-Id: I47231c21df80bc36b6d4e15369748017b50b8da1
Callers of IpClient can tell it via the Builder whether a stable or
a random link-layer identifier is used. IpClient will make the
appropriate IP-layer adjustments (for now this means RFC 7217
addresses or not).
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
- ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh runs as well
as possible on AOSP (no new errors)
Bug: 62476366
Change-Id: Ic9d52ea4f2c6c3588852ed41c81f8664d5cc298a
This change switches the signal used for provisioning rechecks from:
ACTION_SIM_STATE_CHANGED
to:
ACTION_CARRIER_CONFIG_CHANGED
Additionally:
- reexamine carrier config overrides during provisioning re-checks
(this just was never happening before).
- refactor shared code out to VersionedBroadcastListener
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net
Bug: 63400667
Bug: 67755969
Change-Id: Ib9d222eb7ca0e0dd988a1bd97ab32059189ada2c
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
- both wifi and ethernet connectivity works
Bug: 62476366
Change-Id: I3b56e75d545594b88849a621e4ae09f2e1d45c69
This is a pure refactoring with no a behavior change other than
that these calls now go through android.system.Os, which immediately
delegates to Libcore.os.
This is a first step towards separating framework (via
android.system.Os) vs. libcore (via Libcore.os) clients of these
low level APIs. Separating these is a prerequisite towards moving
the API parts of android.system into framework, and moving the
rest into a different package in libcore.
Test: Treehugger
Bug: 67901714
Change-Id: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
Merged-In: Ifd8349ec5416e5693f40dba48fdf2bef651b7d81
Test: Pulled out of a client app ; the client app is behaving
Test: identically to how it was behaving before. Wrote unit
Test: tests in frameworks-net.
Change-Id: I397137748a95c65cee2e1e1b243a1a260e83a6f7
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