[Android] NetworkInterface.GetAllNetworkInterfaces() returns strange values on Android 11 + IPv6 #6649
Labels
external
partner/android
Issues for the Android SDK
partner
Issue or Request from a partner team
platform/android 🤖
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
All tests have been done on a Xaomi Pad 5 (physical device, Android 11).
If target sdk is set to < 30, the values returned by NetworkInterface.GetAllNetworkInterfaces() seem valid:
If target sdk is set to 31, the values returned by NetworkInterface.GetAllNetworkInterfaces() are outside of the enum ranges and name/description are empty. This screen shot shows the situation if IPv6 is not enabled in the router:
If IPv6 is enabled in the router, NetworkInterfaceType and OperationalStatus values are even worse.
Steps to Reproduce
MainPage.xaml.cs
MainPage.xaml
Version with bug
Release Candidate 2 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 10/11 (target sdk >= 30)
Did you find any workaround?
Currently I have to ignore the values for OperationalStatus and use the interface with valid UnicastAddresses.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: