Skip to content

[Android] Fix NetworkInterface.GetAllNetworkInterfaces on API 21-23 - #76541

Merged
simonrozsival merged 2 commits into
dotnet:mainfrom
simonrozsival:android-fix-get-all-network-interfaces-api-21-23
Oct 3, 2022
Merged

[Android] Fix NetworkInterface.GetAllNetworkInterfaces on API 21-23#76541
simonrozsival merged 2 commits into
dotnet:mainfrom
simonrozsival:android-fix-get-all-network-interfaces-api-21-23

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Oct 3, 2022

Copy link
Copy Markdown
Member

This is a follow-up to #76370

The pal_ifaddrs.c file was incorrectly removed in #76370. We need it to keep it as a fallback to support Android 5-6 (API 21-23).

/cc @akoeplinger

Fixes#75809
Fixes#76493
Fixesdotnet/android#6973

@ghost

ghost commented Oct 3, 2022

Copy link
Copy Markdown

Tagging subscribers to 'arch-android': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

This is a follow-up to #76370

The pal_ifaddrs.c file was incorrectly removed in #76370. We need it to keep it as a fallback to support Android 5-6 (API 21-23).

/cc @akoeplinger

Author:simonrozsival
Assignees:-
Labels:

os-android

Milestone:-

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@simonrozsival

Copy link
Copy Markdown
MemberAuthor

Failing tests are unrelated

@simonrozsival
simonrozsival merged commit e2e4e71 into dotnet:mainOct 3, 2022
simonrozsival added a commit to simonrozsival/runtime that referenced this pull request Oct 3, 2022
carlossanlop pushed a commit that referenced this pull request Oct 5, 2022
…erfaces (#76565)
* [Android] Fix NetworkInterface.GetAllNetworkInterfaces (#76370)
* Revert "[Android] Port getifaddrs implementation from Xamarin.Android (#71943)"
This reverts commit 1de4a5c.
* Fix allocating memory block for interfaces and addresses on recent Android SDKs
* Detect loopback interface on Android
* Add comment with explanation
* Simplify the changes to be closer to the original code
* Fix build
* Fix typos
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Improve comment
* Indent using spaces instead of tabs
* Remove check for ifaddrs.h
* Add ANDROID_GETIFADDRS_WORKAROUND
* Update comment
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* [Android] Fix NetworkInterface.GetAllNetworkInterfaces on API 21-23 (#76541)
* Bring back pal_ifaddrs
* Update the header file
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
simonrozsival added a commit to simonrozsival/runtime that referenced this pull request Oct 20, 2022
@ghostghost locked as resolved and limited conversation to collaborators Nov 3, 2022
@karelzkarelz added this to the 8.0.0 milestone Mar 22, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.