Index: src/modules/module-rtp-session.c
--- src/modules/module-rtp-session.c.orig
+++ src/modules/module-rtp-session.c
@@ -1091,9 +1091,9 @@ static int make_socket(const struct sockaddr_storage* 
 	spa_zero(req);
 	if (ifname) {
 		snprintf(req.ifr_name, sizeof(req.ifr_name), "%s", ifname);
-		res = ioctl(fd, SIOCGIFINDEX, &req);
+		res = pw_if_nametoindex(ifname, fd);
 	        if (res < 0)
-	                pw_log_warn("SIOCGIFINDEX %s failed: %m", ifname);
+	                pw_log_warn("pw_if_nametoindex %s failed: %m", ifname);
 	}
 	res = 0;
 	if (af == AF_INET) {
