commit | 3e8ed63d0a4f974f8929cf44d7e77a3baa25f321 | [log] [tgz] |
---|---|---|
author | Pete Gillin <peteg@google.com> | Wed Feb 07 12:51:17 2018 +0000 |
committer | Pete Gillin <peteg@google.com> | Fri Feb 09 15:06:03 2018 +0000 |
tree | 61a7a11da5277333392bebbe84eec85e1d4b9370 | |
parent | b6a4486de1575a1f45617ad619e5cada07b1ed16 [diff] |
Make NetworkInterface.isUp() test for IFF_RUNNING. This makes java.net.NetworkInterface.isUp() return true only if the interface has both IFF_UP and IFF_RUNNING flags set. This restores the behaviour of nougat[1], and makes the behaviour match the javadoc. The behaviour in oreo[2] was changed during a rewrite[3] which replaced the native implementation with a pure java implementation that dropped the IFF_RUNNING check (compare the new java code with the removed native code). There is no evidence that this behaviour change was intentional. This change also reverts the changes to CTS made for oreo to work around the behavioural change. This reverts commit acd3bea08043a3c0a4272f1584f9f5475c550bb2. [1] https://android.googlesource.com/platform/libcore/+/nougat-release/ojluni/src/main/native/NetworkInterface.c#393 [2] https://android.googlesource.com/platform/libcore/+/oreo-release/ojluni/src/main/java/java/net/NetworkInterface.java#452 [3] https://android-review.googlesource.com/c/platform/libcore/+/231080 Bug: 71977275 Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases Change-Id: I75066e49c5f864828adc928cc3687311f2f05011