summaryrefslogtreecommitdiff
path: root/src/android/net/ip/IpReachabilityMonitor.java
AgeCommit message (Collapse)Author
2020-05-01Do not stop FdEventsReader on handlePacket errorTreehugger Robot
Previously if handlePacket threw an exception, FdEventsReader would stop reading and close the file descriptor. This is not helpful as users of this class may encounter errors processing a particular packet (typically), but they generally should not stop completely for that reason. Also address comments from previous change (Exception instead of Throwable: Throwable should not be caught in general; event -> events). Bug: 152842850 Test: atest NetworkStackTests Original-Change: https://android-review.googlesource.com/1295503 Merged-In: I14abe8163ecdfd5251731915f10ea374bfa38b70 Change-Id: I14abe8163ecdfd5251731915f10ea374bfa38b70
2020-05-01Fix potential exceptions in FdEventReader usersRemi NGUYEN VAN
In particular, - Fix a possible NPE In IpNeighborMonitor, if a NUD_FAILED is received for some neighbor before all other neighbors have received RTM_NEWNEIGH. - Add try / catch in IpNeighborMonitor, DhcpPacketListener, ConnectivityPacketTracker in case some unexpected exception is thrown while processing packets. - Add Log.wtf logging in FdEventsReader in case any such exception is missed. Bug: 152842850 Test: atest NetworkStackTests Original-Change: https://android-review.googlesource.com/1274609 Merged-In: Ia03fec358e98b3f218220e70fc3265e14ca15f78 Change-Id: Ia03fec358e98b3f218220e70fc3265e14ca15f78
2020-04-30Fix IpReachabilityMonitorTest flakes/Q failuresRemi NGUYEN VAN
IpReachabilityMonitor was failing on Q because of: - Usage of HexEncoding.encodeToString(byte[], boolean) that did not exist in Q - Flakes/failures caused by missing permissions when calling IpConnectivityLog - Flakes caused by mocking FileDescriptor#valid() while it could be accessed from another thread Bug: 152723363 Test: atest IpReachabilityMonitorTest --rerun-until-failure 500 Merged-In: I9d38c696bf1b3b63be3b9df3161168ee291e7beb Change-Id: I9d38c696bf1b3b63be3b9df3161168ee291e7beb (cherry picked from commit 162c7ee3601b49f55b7a72597067bc93836dbb96)
2020-04-07Add tests for IpReachabilityMonitorRemi NGUYEN VAN
The first tests just verify that provisioning is lost if all IPv4/6 DNS servers or gateways are lost. Test: atest NetworkStackTests Bug: 152819907 Merged-In: I8da6a8f4f237ce963c0a1610432d310160fd3f20 Change-Id: I8da6a8f4f237ce963c0a1610432d310160fd3f20
2020-03-17Provide RRO to configure neighbor unreachable probes parameters.Automerger Merge Worker
Bug: 130871097 Test: atest FrameworksNetTests NetworkStackTests Merged-In: Idc2c4303640d4fd3fc29dd0957771088820030ff (cherry picked from commit f540206076ca0e55d685ef81e3e04da3e9a654cf) Change-Id: Icd69008635461aa24d976f9b9d2d0ef1d60e23d5
2019-03-26Enable more logs for networkingRuoyao Liu
Sometimes we would encounter problems that happen by chance and hard to reproduce. So we recommend to enable more logs in ENG and UESRDEBUG load by default. Bug: 123256412 Test: android.net.ip.IpClientTest can pass Change-Id: Ia3363de96966a4e86ab550c768fb70317da005ed
2019-03-25Fix API in CaptivePortal and ConnectivityManagerRemi NGUYEN VAN
- Remove CaptivePortal constructor from SystemApi. This constructor was added in Q timeframe and ends up being unnecessary since CaptivePortal creation was refactored to ConnectivityService because of visibility issues on ICaptivePortal. - Rename getAvoidBadWifi to shouldAvoidBadWifi - Add permission annotation for shouldAvoidBadWifi (already merged in internal as: I09545c00af3519dbf141dd5951b28f49e37b3e80) Test: flashed, WiFi and captive portal works Bug: 128935314 Bug: 128935673 Merged-In: I09545c00af3519dbf141dd5951b28f49e37b3e80 Change-Id: I7395d4a4db6a64398a827692aee1956c011873e5
2019-03-21Fix Automated API Review issues.paulhu
1. Some API's argument/return value must be marked either @NonNull or @Nullable. 2. Change some system APIs to public APIs. 3. Modify the method name Bug: 126700123 Bug: 126702339 Bug: 126699682 Bug: 118296575 Bug: 126699216 Bug: 126699675 Bug: 126699429 Bug: 126699193 Bug: 123586045 Test: atest FrameworksNetTests Change-Id: Iaa2832cdcf83758ed0fec81b954a0c63bc5a7bf6
2019-01-28Add hidden utils and constants to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: 112869080 Change-Id: I1a803f7954ab760294436226d6c1cffb934e98f9
2019-01-23Move IpClient to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: b/112869080 Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5