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.
This commit is contained in:
Ryan Mounce
2024-02-27 22:20:27 +10:30
parent 2dba9bc8ca
commit b6a3835d45
+2 -1
View File
@@ -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) {