Skip to content

Commit

Permalink
Limit PTP addresses to configured network interface
Browse files Browse the repository at this point in the history
Otherwise every address on the system is advertised and AirPlay 2
sources will send PTP announce + signalling messages to all of them in
parallel.
  • Loading branch information
rmounce committed Feb 27, 2024
1 parent 2dba9bc commit b6a3835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b6a3835

Please sign in to comment.