Skip to content

Conversation

weili-jiang
Copy link
Contributor

@weili-jiang weili-jiang commented May 29, 2025

Baresip's default out-of-the-box networking currently doesn't work well on Android when IPv6-only due to inability to enumerate IPv6-only network interfaces. This appears to be because ifaddrs support is currently disabled. There are APIs to manually add interfaces to Baresip but this requires more advanced integration with the Java API in Android.

Android added ifaddrs support in API level 24 (Android 7) which was ages ago:
https://android.googlesource.com/platform/bionic/+/master/libc/include/ifaddrs.h#81

This PR allows ifaddrs to be used on Android API >= 24 so that the built-in Baresip networking works with IPv6-only networks.

I have enabled it and tested that with this change, Baresip can successfully use getifaddrs on a non-rooted Android 13 phone to enumerate IPv6-only interfaces without any integration with Java APIs.

Extracted from #1329 (many discussions in that PR, most of which is unrelated to this change).

@sreimers sreimers merged commit 0a9076f into baresip:main May 30, 2025
38 checks passed
jmontorosf pushed a commit to sipfront/re that referenced this pull request Jun 12, 2025
Co-authored-by: Wei Li Jiang <weili.jiang@taitcommunications.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants