Bug#872361: mpg123 misparses IPv6 address + port in http_proxy

Ivan Shmakov ivan at siamics.net
Wed Aug 16 17:35:18 UTC 2017


Package:  mpg123
Version:  1.23.8-1+b1

	It appears that mpg123(1) fails to notice the :PORT suffix when
	parsing an http_proxy value that contains an IPv6 address.

	Consider, e. g.:

$ http_proxy=http://\[::1\]:8080/ \
      strace -o "$(mktemp -- /tmp/strace.XXXXXXXX)" -- \
      mpg123 --test -- http://stream.chipbit.net:8000/autodj.m3u 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
	version 1.23.8; written and copyright by Michael Hipp and others
	free software (LGPL) without any warranty but with best wishes
HTTP request failed: 404 Not Found
main: [src/mpg123.c:709] error: Access to http resource http://stream.chipbit.net:8000/autodj.m3u failed.
$ 

	The strace(1) output reveals that mpg123(1) tries to connect to
	the default HTTP port (80), not the one specified (8080):

connect(3, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0

	Also to note is that using an (IPv6-only) name (as shown below)
	in place of the IPv6 address does not cause the issue.

$ http_proxy=http://ip6-localhost:8080/ \
      mpg123 --test -- http://stream.chipbit.net:8000/autodj.m3u 

-- 
FSF associate member #7257  58F8 0F47 53F5 2EB2 F6A5  8916 3013 B6A0 230E 334A



More information about the pkg-multimedia-maintainers mailing list