Development discussion of WireGuard
 help / color / mirror / Atom feed
* Wireguard-go on Android 11+
@ 2023-04-12 12:39 Anton
  0 siblings, 0 replies; only message in thread
From: Anton @ 2023-04-12 12:39 UTC (permalink / raw)
  To: wireguard

Hi all,

I'm porting a Golang-based program [1] to Android11+ (API level 30)
and I've faced a problem,as the getifaddrs function is not available
for apps and other restrictions.

From Android developer documentation [2]:
> In addition, non-privileged apps can't access the device's MAC address; only network interfaces with an IP address are visible. This impacts the getifaddrs() and   NetworkInterface.getHardwareAddress() methods, as well as sending RTM_GETLINK Netlink messages.
>   The following is a list of the ways that apps are affected by this change:
>   NetworkInterface.getHardwareAddress() returns null for every interface.
>   Apps cannot use the bind() function on NETLINK_ROUTE sockets.
>   The ip command does not return information about interfaces.
>   Apps cannot send RTM_GETLINK messages.

I came up with a workaround [3], and now my app works OK.

External references:

best regards,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-22 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 12:39 Wireguard-go on Android 11+ Anton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).