From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 5E1C94E230 for ; Thu, 15 Jan 2026 00:41:43 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'raU3CMbYOJp9pGt+l5mYO23+Jmjg7TJUwFlqrAsxnQA=', expected b'zYAG0nKLfNKBfiv/qBQSBkQAnVrxnerFJDfJt0vjGpk=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1768437688; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=raU3CMbYOJp9pGt+l5mYO23+Jmjg7TJUwFlqrAsxnQA=; b=wfl4R+UWg80uh0qfAcAKvJDE2YZimlj6+CZXubjomuednlqVP+3bxEBpLiZi/RTKK964E cB2rhKXstzC3OCTq+Vlplo1r1VTq3ItAqnKzCxetO1BiXvKul3lKKDZj1SnzM2V0Qq+ZKYM uVBJQ1BDh2/QoSE5N43885Ymc1SXpXfnt3zDSfKKHPpjEwaM/D1iyATuZmwJpUwSytkxg1b huCQXmWFsIfZ4WRhYo2CTDTYlMghLBOt13aMh2fu5fcX2ldPq9xG0W80Em4Bj+8/r1JaBpV ZO2hP/tb30wA9rJJ2WvNQA9cO+49P2f12TfASXpuUaRuj5rSfhnNpZ0q7gKQ== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id D592A690E16; Thu, 15 Jan 2026 02:41:28 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1768437665; b=h3hvH6BVjKkUVx2VBPB/w9Kn75LJuf06kRAIao5L70NNtOyfx44TIEzNG/hQqehSYKe+J Qea+l03iDvhPdgRSFWmC2RtjZ5JBUYPLU6UybJK5K21hM6TOeWzH45WGwAsuWMo1uG8xmnr n/PJ8kkAESHC+F6r6CKfBoX/7IVAU0NYpN5l37E/63f87UZTngUM4Sgy8asKSlCr53vnaXt SMnisE2OM9NNoP0g+x/TGX3zer/7AslKPskkWVwJ+Ja6ugN48074lCCrthfYIO9qMMoVpMn VBGMuY0Gnx1Zzg0rpzG3CfgPPiAUuTYo3guqI+bdlzOUdSjCGjsUaLZPA4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1768437665; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=XO/e41oV6Gjn3ke+sntoWAF5FxChn6yYcC5x4dSVoJ4=; b=VCcawc0x585RCPXErRJAtTfCprh/APsYVa/2tj89w3oXBOWYz0t2eADu7t3ek6VBCNnWU FJsoEEYwFCP+71YKksDMrajTHrQ6r3fouDiAEl3tYRlp6fZR+Bgydz20r6cjOlGkT6REffC +JlWzhDDn+WdK+8fA1F9ui/sjZlIQL/7/YZB/1nzKa9sjcSX0YCbZb7w76Pa0ZhnzFmKEMd hwWV3TpLdrD0nthFZ2Tdnje7WaFKoLY3p2MFkVm2EYKls0yBYDFLRin0h2mPJ+QEVJv0UFA EBoo5anHRsBNp9kZF35FWkmBXl23XaEZo7aMGLa3jdxrHe0xGfQP8SLzib0w== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1768437656; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=zYAG0nKLfNKBfiv/qBQSBkQAnVrxnerFJDfJt0vjGpk=; b=NY07lPt70KjbYfcGfqJHCp0W+xLuY1WFhFxE9PFOcXGJxPAReICR1jlj6ex6kBDsiOnT8 esfngUtOvMg/LcRMCGaBL6uyNEobPx4TApH2N8UANmcOMFHT2H+pVrgzEFLf7fLnxZ7Qv4v FpKbjekfPhEGYA1lP6DHQmEmk985eAv5wrFsF20hut0LKcMi60IoUX2LKisFB+t0v2FuHaM sPfALqn1nqrSBRLYk7jPU+MHy3zXXW7JIuKFkTUDXc2pLMRb0pWsTtJwmj5uvvGaFtC2dGe WCZ6w5Zg1RUDFdinwegsH0FbAhDIwL+J+QB9PUxHJLJ2tUG8akGGw1t/8++Q== Received: from f7c34508609e (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B811168FCB7 for ; Thu, 15 Jan 2026 02:40:56 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Jan 2026 00:40:56 -0000 Message-ID: <176843765692.25.16788318577617920512@4457048688e7> Message-ID-Hash: 2X7BRCNHU5EP7SN6BFTGGKIA73S6A4MG X-Message-ID-Hash: 2X7BRCNHU5EP7SN6BFTGGKIA73S6A4MG X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] WIP: Don't bind sockets to 0.0.0.0 by default for unicast UDP inputs (PR #21470) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Rost via ffmpeg-devel Cc: Rost Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21470 opened by Rost (rost.kurylo) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21470 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21470.patch >>From 6bc89b9956a2bf5606a6d3bd89c7abcba1c61110 Mon Sep 17 00:00:00 2001 From: Rost Kurylo Date: Tue, 13 Jan 2026 11:17:57 -0800 Subject: [PATCH 1/2] Don't bind sockets to 0.0.0.0 by default for unicast UDP inputs --- libavformat/udp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index 61e80c86c5..4718457f42 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -700,6 +700,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) struct sockaddr_storage my_addr; socklen_t len; int ret; + const char *bind_addr = NULL; h->is_streamed = 1; @@ -759,7 +760,12 @@ static int udp_open(URLContext *h, const char *uri, int flags) if ((s->is_multicast || s->local_port < 0) && (h->flags & AVIO_FLAG_READ)) s->local_port = port; - udp_fd = udp_socket_create(h, &my_addr, &len, s->localaddr); + if (!s->is_multicast && (s->localaddr == NULL || s->localaddr[0] == '\0') && h->flags & AVIO_FLAG_READ) + bind_addr = hostname; + else + bind_addr = s->localaddr; + + udp_fd = udp_socket_create(h, &my_addr, &len, bind_addr); if (udp_fd < 0) { ret = AVERROR(EIO); goto fail; -- 2.49.1 >>From 0ed684751806933020deba95345b608284feb489 Mon Sep 17 00:00:00 2001 From: Rost Kurylo Date: Tue, 13 Jan 2026 11:28:04 -0800 Subject: [PATCH 2/2] Explicitly bind RTP sockets to 0.0.0.0 in rtsp A better alternative is to bind to a local IP that is used to communicate with RTSP server via signalling socket. Should be considered as a further improvement. --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e8f44e571a..048f8de5bb 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1566,7 +1566,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, while (j + 1 <= rt->rtp_port_max) { AVDictionary *opts = map_to_opts(rt); - ff_url_join(buf, sizeof(buf), "rtp", NULL, host, -1, + ff_url_join(buf, sizeof(buf), "rtp", NULL, "0.0.0.0", -1, "?localport=%d", j); /* we will use two ports per rtp stream (rtp and rtcp) */ j += 2; -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org