Age | Commit message (Collapse) | Author |
|
Add a configurable option in the RRO which controls whether or not to
send the hostname set in the Settings->About phone->Device name. The
option in RRO is false by default, that means DHCP Request still not
include any hostname by default. Once the option is overlaid and enabled,
the device name after transliteration will be wrote into hostname option.
Bug: 131783527
Test: atest NetworkStackTests NetworkStackIntegrationTests
Test: manual test, create empty APK to overlay the RRO configuration.
Change-Id: I9af0b0d9e7bb526d3a3c1003bb99d0a3d69b1e9e
|
|
Overload NetworkStackUtils.getDeviceConfigPropertyInt API to check if the
value of property read from DeviceConfig is valid, value in the range
of mininum and maximum would be acceptable, otherwise, return the default
value.
Bug: 128639898
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: I07e3e9d1e1b7252d852d4665d2ea254f29a1c3eb
|
|
- receiving CMD_TIMEOUT before aborting FILS process.
- receiving CMD_TIMEOUT after aborting FILS process.
- receiving CMD_TIMEOUT before success FILS process.
- receiving CMD_TIMEOUT after success FILS process.
Bug: 140223017
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: I519bf2fdda38cb9666f769868379a0c044356db0
|
|
|
|
Tcp evaluation for data stall should focus on the target
network. Otherwise, the signal will be influenced by sockets on
other networks.
Bug: 130325409
Test: NetworkStackTests NetworkStackNextTests
Change-Id: Ic864b2daf81fcf57331fe7131eab14e8459e3f9b
|
|
|
|
Provide a way for OEM to provide their customization when
device doesn't have a sim card inserted.
Bug: 141406258
Test: 1. Build pass
2. atest NetworkStackTests
Change-Id: Iad8340e643580f8efa536884d22f0ea0a97cd9a5
|
|
Bug:136216415
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Test: manual tethering
Change-Id: I0f9483c72374bab271eb18549a1a41812f32f2dd
|
|
|
|
Disable this behavior by default, we can enable it with flag rollout
later.
Bug: 128639898
Test: atest NetworkStackTests NetworkStackIntegrationTests
Test: manual test
Change-Id: Ie2133bc5faaba085147519cdb5c8277c563cfbd7
|
|
|
|
|
|
In normal case, the order will be configured as receiving the
ByteBuffer via NetlinkSocket.recvMessage() except unit test.
The order should be correctly set to algin with the behavior.
Incorrect order will cause incorrect content parsing.
Bug: 145328512
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: I496cc81315bea15a723a04be300ee39e2481b933
|
|
Parse tcp info only until tcpi_sndbuf_limited now. If device
kernel version >= 4.18, there will be some un-parsed bytes left
because the tcp_info struct was expanded. Skip the remaining
un-parsed part.
Bug: 145275899
Bug: 145328512
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: I56aa6be183b8b804898926dae2c47a497c49f893
|
|
Bug: 140223017
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Test: manual
Change-Id: Ibf200891c9742825a599a21b43f02927869f98ab
|
|
|
|
|
|
Now turn off tcp detection with device config can only allow
NetworkMonitor to ignore tcp signal. The tcp polling logic will
still contiune running. The flag should also turn off the tcp
polling.
Bug: 145275899
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: Ia2b24ba6d604a4499cd30c6d508643082665ca9a
|
|
This simplifies StartedState a bit, and should have no impact on
behaviour.
Test: atest IpClientIntegrationTest
Change-Id: Ie897307925a9af571a622c823d4c641956e607f3
|
|
This reverts commit 00e3086c939ef0865c8182982a9f3d94da854a3b.
Reason for revert: <Protection added>
Fix: 142035706
Change-Id: I2f0269f4a62e80257be5ac37daa11e09fd15a2c7
|
|
|
|
Returned message from kernel in cf device may not work
as intended and crash NetworkStack. Since NetworkStack stays
in the system process, the crash will break device and impact
users. Catch the exception to prevent break whole device.
Bug: 145275899
Bug: 142035706
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: I7b7ecacfc76c54748a4428f04c5422506d85b8d2
|
|
|
|
|
|
The length in RoutingAttribute use getshort() from ByteBuffer.
Theoretically, it should be stored as a short. Also, similar
structure alignment is implemented in alignedLengthOf() in
NetlinkConstant. Update to use the same function.
Bug: 145275899
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: Ibabb15ee0a96b4c0331cc080b578c625e10d4b37
|
|
The target parsing mechanism focuses on SOCK_DIAG_BY_FAMILY.
The returned message with unexpected messages will cause
the parsing mechanism does not work as intended. Thus,
skip parsing on incorrect message.
Bug: 145275899
Bug: 142035706
Test: atest NetworkStackTests NetworkStackNextTests
Change-Id: I73ab979c735268551a54b0a88de18c6d1a2068c4
|
|
Bug: 145224211
Test: FrameworksNetTests NetworkStackTests
Change-Id: I196d1a507cb054058427fa5fa6c7fd42a3b3f886
|
|
Address follow up actions and comments
Bug: 130325409
Test: NetworkStackTests NetworkStackNextTests
Change-Id: Ic768f08e5e54667e375c0d486df278773d9c707a
|
|
After introducing IP address conflict detection mechanism, we might get
an duplicated IP address though the DHCP handshake, it's not appropriate
to notify IpClient that DHCP success and configure interface with this IP
address immediately. However, Bound State ensures that we have already
done DAD (if enabled) and IP address has been configured on the interface.
More reasonable to notify IpClient DHCP success when entering Bound state.
This CL does not change the behaviour of a successful transaction.
The call graph is:
- notifySuccess
- acceptDhcpResults
- when receiving an ACK in DhcpReacquiringState
- next action: transition to DhcpBoundState
- called from confirmDhcpLease
- when receiving a rapid commit ACK in DhcpInitState
- next action: ConfiguringInterfaceState
- next action: configure link address, then transition to DhcpBoundState
- when receiving an ACK in DhcpRequestingState
- next action: ConfiguringInterfaceState
- next action: configure link address, then transition to DhcpBoundState
This CL does change the behaviour of failed transactions. For example,
if configuring the IP address or opening the UDP socket fails, after
this CL, the client will no longer notify success. This is more correct.
Bug: 130775067
Test: atest NetworkStackTests NetworkStackIntegrationTests
Change-Id: Ie3b5edd8ddf04aac258b97ecaa291fcb25611bbd
|
|
|
|
Follow up clean up to address comment in aosp/1157145
Bug: 136162280
Test: atest NetworkStackTests
Change-Id: Ifef8e40b19e51a4dc63345250ece97388d706633
|
|
Allow NetworkStack to send SockDiag netlink request and parse
returned tcp info. Evaluate the internet health from the tcp
information.
Bug: 136162280
Test: atest NetworkStackTests NetworkStackNextTests
Test: Use "adb shell ss" command to check the parsing info
Change-Id: I8df0d11c748c95d3a57115ebb6a4e29d8b50f177
|
|
Correct the package name in the test. Test should be placed in
the same package with source.
Change-Id: I717e3c03268253d09a84ddceb47d5aeaf6164a50
Fix: 144532941
Test: atest NetworkStackTests NetworkStackNextTests \
NetworkStackIntegrationTests
|
|
Add base class corresponding to tcp_info struct in kernel to
support parsing and necessary decoding.
Test: atest NetworkStackTests
Test: Use "adb shell ss" command to check the parsing info
Bug: 136162280
Change-Id: Ic226d908c93c8e39583ba3d4ea7d612e3b6afbac
|
|
|
|
Fix sll_protocol in DhcpClient packet socket
The broadcast socket address was created with a deprecated API that does
not set sll_protocol. This causes packets to be filtered incorrectly in
packet capture, typically with tcpdump.
This change only affects device with API > Q, since Q does not have the
proper API to set the protocol.
Also includes fixing the build path that was referencing apishim/current
(which does not exist) instead of apishim/30 (the correct directory).
SocketUtilsShim can be used on the system_current target with that fix.
See change: I07887b82e0e32aadb0cbb9f930f2b2fa3e277ca9
Bug: 133196453
Test: manual; on AOSP with the new build, packet capture has the right
protocol. When installed on a Q release build, behavior is
unchanged.
This reverts commit 5ad0944d24e8dabc7fa56c3325e9200669889641.
Reason for revert:
Roll forward the previous change, as the build breakage has been
addressed. The stable build target is now used to build the
NetworkStack mainline module, which allows this change to be merged.
Change-Id: Ie933050ef269ce2159f3f44ac4db1f9aae134faf
|
|
|
|
This reverts commit 0c5e74000546a6c148e79985ee5fbf53dc454453.
Reason for revert: Broke build in qt-qpr1-dev-plus-aosp
Change-Id: I2e5738e776881f8c4f3cf459398a250560a43559
|
|
|
|
The broadcast socket address was created with a deprecated API that does
not set sll_protocol. This causes packets to be filtered incorrectly in
packet capture, typically with tcpdump.
This change only affects device with API > Q, since Q does not have the
proper API to set the protocol.
Also includes fixing the build path that was referencing apishim/current
(which does not exist) instead of apishim/30 (the correct directory).
SocketUtilsShim can be used on the system_current target with that fix.
See change: I07887b82e0e32aadb0cbb9f930f2b2fa3e277ca9
Bug: 133196453
Test: manual; on AOSP with the new build, packet capture has the right
protocol. When installed on a Q release build, behavior is
unchanged.
Change-Id: Iaafd0b3935473b1cfab61b49b2f107e71e01de2d
|
|
Some routers have been known to use RDNSS lifetimes of 10
seconds(!). This causes APF filters to be set to very low
lifetimes, which substantially impacts battery life.
There are two parts to this:
1. Ignore low RDNSS option lifetimes for the purpose of
calculating APF filter lifetimes.
2. Do not add DNS servers to the repository if their lifetimes
are too low.
If we do #1 without #2, the servers will expire because APF will
drop the RAs that refresh them, potentially causing outages or
disconnections.
The behaviour is enabled by default starting from R and can be
enabled on all builds using a flag.
Bug: 66928272
Test: New unit test passes
Change-Id: Ib2e2555026da3e81ea3d50767a30092413b4e4f5
|
|
|
|
* changes:
Always expire servers when receiving a zero-lifetime RDNSS option
Add a test for IPv6 provisioning and RDNSS.
|
|
When firmware receives RAs with different retransmission
timer, it is expected the RAs should be accepted by apf
filter. However, they are currently dropped since missing
fields which should be added into match section. It causes
to apf filter treats those RAs as the same and then drops.
This change adds the remaining fields to match section to
compare reachable time and retransmission timer with incoming
RAs.
Also, add test to check that RIOs differing only in the
first 4 bytes are different should be passed.
Bug: 143186590
Test: sent RAs with different rtt and check RAs are accepted
Change-Id: I7e2de29740f96b212634b5aeffe709d57afafc68
|
|
When receiving a zero-lifetime RDNSS option for DNS servers that
is already configured, the code first sets the lifetime of the
servers to zero, and then runs code that prunes expired servers.
Because expired servers are pruned only if "expiry < now", if the
pruning happens in the same millisecond as the update, the
servers aren't actually pruned. This can happen multiple times,
so if the code runs fast enough, the server will never expire.
Fix this by using <= instead of <.
Fix: 143806550
Test: makes the new IpClientIntegrationTest#testRaRdnss not flaky
Change-Id: Icf6893efdc028859b178eb234f6f1a42b24e2936
|
|
Currently, IpClientIntegrationTest only tests IPv4-only
connections. Add a test that uses an IPv6-only network.
Bug: 66928272
Test: test-only change
Change-Id: I7d788724411fa81ae560a933727c81aadb6d6ba4
|
|
|
|
|
|
The purpose is to make subclass that only requires timeout method
could extend from TimeoutState instead of PacketRetransmittingState,
avoiding the anti-pattern of using inheritance for code reuse only.
After refactoring, class inheritance relationship looks like:
LoggingState <-- TimeoutState <-- PacketRetransmittingState <-- DhcpInitState
Bug: 140223017
Test: atest FrameworksNetTests NetworkStackTests
Test: atest NetworkStackIntegrationTests
Change-Id: I1fed3ff3ef8b0bdf3645188949e38c3a332f9d6e
|
|
NetworkStack uses hidden android.annotation.* annotations by pulling the
source files from frameworks/base. This should not be necessary, since
androidx annotations can be used instead.
Remove usage of such annotations and replace with androidx annotations.
Test: m NetworkStack NetworkStackApiStable
Test: builds, boots, WiFi working
Bug: 139105333
Change-Id: I24e147ac4f01feaf53424430b4825b316ec154fe
|