Skip to content

DLNA/UPnP discovery fails on VLC 3.6.5 (Android) due to SELinux denial (if_inet6 read blocked)

Description In VLC for Android version 3.6.5 (build 3060500), the DLNA/UPnP discovery feature is broken, whereas it worked correctly in previous versions such as 3.6.2 (last working). On startup, VLC attempts to discover UPnP devices using libupnp, but fails silently due to an SELinux denial related to reading /proc/net/if_inet6. This appears to block initialization of the UPnP service on the device.

Expected behavior UPnP devices should be discovered and listed under Local Network > Universal Plug'n'Play, as in previous VLC versions.

Actual behavior No UPnP devices are found. Although the network interface (wlan0) is valid, the libupnp initialization fails silently due to SELinux restrictions on reading /proc/net/if_inet6.

Steps to reproduce Install VLC 3.6.5 on an Android 13+ or Android 14 device (with SELinux in enforcing mode).

Connect to a local network with available UPnP devices.

Open VLC > Browse > Local Network > Universal Plug'n'Play.

No devices are displayed despite being on the same network.

Screenshot / video

N/A

Context App version VLC 3.6.5 (build 3060500) libvlc version: 3.6.2 MediaLibrary: 0.13.13-rc17

Android version Android 14 (API 35)

Device model Xiaomi 2405CRPFDG

App mode Smartphone

Relevant Log Snippet: pgsql Copy Edit 07-27 19:45:46.563 I/MediaBrowser: starting upnp discover (Universal Plug'n'Play) 07-27 19:45:46.564 I/VLC: Initializing libupnp on 'wlan0' interface 07-27 19:45:46.571 W/DefaultDispatch: type=1400 audit(0.0:58866): avc: denied { read } for name="if_inet6" dev="proc" ino=4026532105 scontext=u:r:untrusted_app:s0:c58,c257,c512,c768 tcontext=u:object_r:proc_net:s0 tclass=file permissive=0 app=org.videolan.vlc Workarounds Downgrading to VLC 3.6.2 restores full UPnP functionality.

Rooting the device and setting SELinux to permissive mode (setenforce 0) also allows UPnP discovery to work, confirming that the issue is due to SELinux policy enforcement.

Suggestion Please consider one of the following:

Avoid directly accessing /proc/net/if_inet6 and use an alternate, non-restricted interface detection method.

Request appropriate system permissions or fallback to a less restricted API for UPnP discovery in Android 13+ environments.