NetBSD Problem Report #51520
From www@NetBSD.org Sat Oct 1 00:10:51 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id B91087A265
for <gnats-bugs@gnats.NetBSD.org>; Sat, 1 Oct 2016 00:10:51 +0000 (UTC)
Message-Id: <20161001001050.B65A77A2BC@mollari.NetBSD.org>
Date: Sat, 1 Oct 2016 00:10:50 +0000 (UTC)
From: adrien_fernandes2@hotmail.com
Reply-To: adrien_fernandes2@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: multimedia/ffmpeg3 - getnameinfo: Non-recoverable failure in name resolution on RTP incoming streams
X-Send-Pr-Version: www-1.0
>Number: 51520
>Category: pkg
>Synopsis: multimedia/ffmpeg3 - getnameinfo: Non-recoverable failure in name resolution on RTP incoming streams
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 01 00:15:00 +0000 2016
>Closed-Date: Fri Feb 23 02:55:23 +0000 2024
>Last-Modified: Fri Feb 23 02:55:23 +0000 2024
>Originator: Adrien Fernandes
>Release: pkgsrc current 22nd July 2016
>Organization:
>Environment:
NetBSD 7.99.34 (GENERIC.201607240240Z) amd64
>Description:
It is actually impossible to read a RTP protocole stream with multimedia/ffplay3.
$ /home/Adrien2002/Programmes/NetBSD/bin/ffplay3 rtp://127.0.0.1:1234
[rtp @ 0x7ae5c5903800] getnameinfo: Non-recoverable failure in name resolution
rtp://127.0.0.1:1234: Input/output error
After patched multimedia/ffmpeg3, it worked, I can watch my stream.
>How-To-Repeat:
Try to read an incoming RTP stream.
>Fix:
--- libavformat/rtsp.c.orig 2016-10-01 02:05:05.262490405 +0200
+++ libavformat/rtsp.c 2016-10-01 02:06:28.990605339 +0200
@@ -2301,7 +2301,7 @@
AVDictionary *opts = map_to_opts(rt);
err = getnameinfo((struct sockaddr*) &rtsp_st->sdp_ip,
- sizeof(rtsp_st->sdp_ip),
+ rtsp_st->sdp_ip.ss_len,
namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST);
if (err) {
av_log(s, AV_LOG_ERROR, "getnameinfo: %s\n", gai_strerror(err));
>Release-Note:
>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/51520: multimedia/ffmpeg3 - getnameinfo: Non-recoverable
failure in name resolution on RTP incoming streams
Date: Mon, 31 Oct 2016 03:50:56 +0000
sa_len is not portable, is there a 'right' fix?
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51520: multimedia/ffmpeg3 - getnameinfo: Non-recoverable
failure in name resolution on RTP incoming streams
Date: Mon, 31 Oct 2016 04:17:52 +0000
On Mon, Oct 31, 2016 at 03:55:01AM +0000, coypu@SDF.ORG wrote:
> sa_len is not portable, is there a 'right' fix?
Wherever the sockaddr comes from should also have the length
explicitly - e.g. accept, getsockname, and so on pass it back and if
the sockname was consed up by the program itself it should know the
proper length at that point. So the value should be around
somewhere...
(I haven't looked at the code myself yet obviously)
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 23 Feb 2024 02:55:23 +0000
State-Changed-Why:
This is essentially a duplicate of PR lib/57609, which is that
getnameinfo requires salen == family length, rather than merely
salen >= family length. Bug fixed in HEAD, will be included in
10.0, needs pullup-9 and pullup-8.
(I guess this issue could stay open if we want to patch this in
pkgsrc so it works on older NetBSD without the fix, although the
patch will need some tweaking to get the details portable. It
seems, though, that libavformat/rtsp.c discards the original
length it got from getaddrinfo ai->ai_addrlen, so the patch may
not be entirely trivial.)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.