From b6a3835d457600ee7e173e17278a21cd54d81973 Mon Sep 17 00:00:00 2001 From: Ryan Mounce Date: Tue, 27 Feb 2024 21:58:06 +1030 Subject: [PATCH] Limit PTP addresses to configured network interface Otherwise every address on the system is advertised and AirPlay 2 sources will send PTP announce + signalling messages to all of them in parallel. --- rtsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtsp.c b/rtsp.c index 3d6c5f48..5b919374 100644 --- a/rtsp.c +++ b/rtsp.c @@ -3044,7 +3044,8 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) // debug(1, "Interface index %d, name: \"%s\"",if_nametoindex(iap->ifa_name), // iap->ifa_name); if ((iap->ifa_addr) && (iap->ifa_netmask) && (iap->ifa_flags & IFF_UP) && - ((iap->ifa_flags & IFF_LOOPBACK) == 0)) { + ((iap->ifa_flags & IFF_LOOPBACK) == 0) && + (config.interface == NULL || (strcmp(config.interface, iap->ifa_name) == 0))) { char buf[INET6_ADDRSTRLEN + 1]; // +1 for a NUL memset(buf, 0, sizeof(buf)); if (iap->ifa_addr->sa_family == AF_INET6) { -- 2.47.2