Debian Bug report logs - #155955
xmms: IPv6 support

version graph

Package: xmms; Maintainer for xmms is (unknown);

Reported by: "Fabio Massimo Di Nitto" <fabbione@fabbione.net>

Date: Thu, 8 Aug 2002 17:48:05 UTC

Severity: wishlist

Tags: patch, sid

Found in version 1.2.7-1.ipv6.r1

Fixed in version xmms/1.2.7-2

Done: Josip Rodin <joy-packages@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://bugs.xmms.org/show_bug.cgi?id=696

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org:
Bug#155955; Package xmms. (full text, mbox, link).


Acknowledgement sent to "Fabio Massimo Di Nitto" <fabbione@fabbione.net>:
New Bug report received and forwarded. Copy sent to Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Fabio Massimo Di Nitto" <fabbione@fabbione.net>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: xmms: IPv6 support
Date: Thu, 08 Aug 2002 19:42:22 +0200
Package: xmms
Version: 1.2.7-1.ipv6.r1
Severity: wishlist
Tags: sid patch


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux diapolon 2.5.29 #2 Sat Jul 27 10:59:17 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages xmms depends on:
ii  libc6                      2.2.5-13      GNU C Library: Shared libraries an
ii  libglib1.2                 1.2.10-5      The GLib library of C routines
ii  libgtk1.2                  1.2.10-12     The GIMP Toolkit set of widgets fo
ii  xlibs                      4.2.0-0pre1v2 X Window System client libraries

-- no debconf information

Hi all,
	the patch was found by Hasso Tepper at http://www.version6.net/
It has been tested and it applies clean.

Thats all folks :)

Fabio

For debian/rules

--- debian/rules	2002-08-08 19:39:30.000000000 +0200
+++ debian/rules.new	2002-08-08 19:39:07.000000000 +0200
@@ -31,7 +31,7 @@
 	touch $@
 
 config.status libxmms/config.status: configure
-	CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc --prefix=/usr \
+	CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc --prefix=/usr --enable-ipv6 \
           --mandir='$${datadir}/man' $(configure_options)
 	for i in libtool libxmms/libtool ; do \
          sed < $$i > $$i-fixed \

For the code

Index: acconfig.h
===================================================================
RCS file: /cvs/xmms/acconfig.h,v
retrieving revision 1.13
diff -u -r1.13 acconfig.h
--- acconfig.h	14 Nov 2001 22:08:14 -0000	1.13
+++ acconfig.h	8 Apr 2002 19:05:50 -0000
@@ -57,6 +57,7 @@
 #undef PACKAGE
 #undef VERSION
 #undef USE_3DNOW
+#undef USE_IPV6
 #undef WITH_SYMBOL_UNDERSCORE
 #undef WITH_SM
 #undef ENABLE_NLS
Index: configure.in
===================================================================
RCS file: /cvs/xmms/configure.in,v
retrieving revision 1.116
diff -u -r1.116 configure.in
--- configure.in	24 Mar 2002 14:38:22 -0000	1.116
+++ configure.in	8 Apr 2002 19:05:51 -0000
@@ -338,6 +338,17 @@
 fi
 AM_CONDITIONAL(USE_3DNOW,test "x$USE_3DNOW" = xyes)
 AC_SUBST(USE_3DNOW_TRUE)
+
+dnl IPv6 support
+dnl ========================
+AC_ARG_ENABLE(ipv6,
+	[  --enable-ipv6		  enable IPv6 support [default=no]],
+			enable_ipv6=$enableval, enable_ipv6=no)
+if test "x$enable_ipv6" = xyes; then
+  AC_DEFINE(USE_IPV6)
+fi
+AM_CONDITIONAL(USE_IPV6,test "x$enable_ipv6" = xyes)
+AC_SUBST(USE_IPV6)
 dnl ========================
 
 AC_CACHE_CHECK(for socklen_t, xmms_cv_type_socklen_t,
Index: Input/cdaudio/http.c
===================================================================
RCS file: /cvs/xmms/Input/cdaudio/http.c,v
retrieving revision 1.5
diff -u -r1.5 http.c
--- Input/cdaudio/http.c	21 Jul 2000 08:54:17 -0000	1.5
+++ Input/cdaudio/http.c	8 Apr 2002 19:05:51 -0000
@@ -25,9 +25,45 @@
 gint http_open_connection(gchar * server, gint port)
 {
 	gint sock;
+#ifdef USE_IPV6
+	struct addrinfo hints, *res, *res0;
+	char service[6];
+#else
 	struct hostent *host;
 	struct sockaddr_in address;
+#endif
 
+#ifdef USE_IPV6
+	snprintf(service, 6, "%d", port);
+	memset(&hints, 0, sizeof(hints));
+	hints.ai_socktype = SOCK_STREAM;
+
+	if (getaddrinfo(server, service, &hints, &res0))
+		return 0;
+
+	for (res = res0; res; res = res->ai_next) {
+		sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol);
+		if (sock < 0) {
+			if (res->ai_next)
+				continue;
+			else {
+				freeaddrinfo(res0);
+				return 0;
+			}
+		}
+		if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
+			if (res->ai_next) {
+				close(sock);
+				continue;
+			} else {
+				freeaddrinfo(res0);
+				return 0;
+			}
+		}
+		freeaddrinfo(res0);
+		return sock;
+	}
+#else
 	sock = socket(AF_INET, SOCK_STREAM, 0);
 	address.sin_family = AF_INET;
 
@@ -40,6 +76,7 @@
 	if (connect(sock, (struct sockaddr *) &address, sizeof (struct sockaddr_in)) == -1)
 		return 0;
 
+#endif
 	return sock;
 }
 
Index: Input/mpg123/http.c
===================================================================
RCS file: /cvs/xmms/Input/mpg123/http.c,v
retrieving revision 1.26
diff -u -r1.26 http.c
--- Input/mpg123/http.c	6 Jan 2002 22:13:16 -0000	1.26
+++ Input/mpg123/http.c	8 Apr 2002 19:05:52 -0000
@@ -332,8 +332,13 @@
 	gboolean redirect;
 	int udp_sock = 0;
 	fd_set set;
+#ifdef USE_IPV6
+	struct addrinfo hints, *res, *res0;
+	char service[6];
+#else
 	struct hostent *hp;
 	struct sockaddr_in address;
+#endif
 	struct timeval tv;
 
 	url = (gchar *) arg;
@@ -355,6 +360,45 @@
 		chost = mpg123_cfg.use_proxy ? mpg123_cfg.proxy_host : host;
 		cport = mpg123_cfg.use_proxy ? mpg123_cfg.proxy_port : port;
 
+#ifdef USE_IPV6
+		snprintf(service, 6, "%d", cport);
+		memset(&hints, 0, sizeof(hints));
+		hints.ai_socktype = SOCK_STREAM;
+		if (! getaddrinfo(chost, service, &hints, &res0)) {
+			eof = TRUE;
+			for (res = res0; res; res = res->ai_next) {
+				if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
+					continue;
+				fcntl(sock, F_SETFL, O_NONBLOCK);
+				status = g_strdup_printf(_("CONNECTING TO %s:%d"), chost, cport);
+				mpg123_ip.set_info_text(status);
+				g_free(status);
+				((struct sockaddr_in6 *)res->ai_addr)->sin6_port = htons(cport);
+				if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
+					if (errno != EINPROGRESS) {
+						close(sock);
+						continue;
+					}
+				}
+				eof = FALSE;
+				break;
+			}
+			freeaddrinfo(res0);
+			if (eof) {
+				status = g_strdup_printf(_("Couldn't connect to host %s:%d"), chost, cport);
+				show_error_message(status);
+				g_free(status);
+				mpg123_ip.set_info_text(NULL);
+			}
+		} else {
+			status = g_strdup_printf(_("Couldn't look up host %s"), chost);
+			show_error_message(status);
+			g_free(status);
+
+			mpg123_ip.set_info_text(NULL);
+			eof = TRUE;
+		}
+#else
 		sock = socket(AF_INET, SOCK_STREAM, 0);
 		fcntl(sock, F_SETFL, O_NONBLOCK);
 		address.sin_family = AF_INET;
@@ -372,9 +416,11 @@
 			mpg123_ip.set_info_text(NULL);
 			eof = TRUE;
 		}
+#endif
 
 		if (!eof)
 		{
+#ifndef USE_IPV6
 			memcpy(&address.sin_addr.s_addr, *(hp->h_addr_list), sizeof (address.sin_addr.s_addr));
 			address.sin_port = g_htons(cport);
 
@@ -393,6 +439,7 @@
 					eof = TRUE;
 				}
 			}
+#endif
 			while (going)
 			{
 				tv.tv_sec = 0;
@@ -697,14 +744,23 @@
 /* Find a good local udp port and bind udp_sock to it, return the port */
 static int udp_establish_listener(int *sock)
 {
+#ifdef USE_IPV6
+	struct sockaddr_in6 sin;
+	socklen_t sinlen = sizeof (struct sockaddr_in6);
+#else
 	struct sockaddr_in sin;
 	socklen_t sinlen = sizeof (struct sockaddr_in);
+#endif
 	
 #ifdef DEBUG_UDP
 	fprintf (stderr,"Establishing udp listener\n");
 #endif
 	
+#ifdef USE_IPV6
+	if ((*sock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
+#else
 	if ((*sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+#endif
 	{
 		g_log(NULL, G_LOG_LEVEL_CRITICAL,
 		      "udp_establish_listener(): unable to create socket");
@@ -712,8 +768,12 @@
 	}
 
 	memset(&sin, 0, sinlen);
+#ifdef USE_IPV6
+	sin.sin6_family = AF_INET6;
+#else
 	sin.sin_family = AF_INET;
 	sin.sin_addr.s_addr = g_htonl(INADDR_ANY);
+#endif
 			
 	if (bind(*sock, (struct sockaddr *)&sin, sinlen) < 0)
 	{
@@ -743,7 +803,11 @@
 	fprintf (stderr,"Listening on local %s:%d\n", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port));
 #endif
 	
+#ifdef USE_IPV6
+	return g_ntohs(sin.sin6_port);
+#else
 	return g_ntohs(sin.sin_port);
+#endif
 }
 
 static int udp_check_for_data(int sock)
@@ -752,10 +816,14 @@
 	char *valptr;
 	gchar *title;
 	gint len, i;
+#ifdef USE_IPV6
+	struct sockaddr_in6 from;
+#else
 	struct sockaddr_in from;
+#endif
 	socklen_t fromlen;
 
-	fromlen = sizeof(struct sockaddr_in);
+	fromlen = sizeof(from);
 	
 	if ((len = recvfrom(sock, buf, 1024, 0, (struct sockaddr *)&from, &fromlen)) < 0)
 	{
@@ -840,7 +908,14 @@
 #ifdef DEBUG_UDP
 			else
 				fprintf(stderr,"Sent ack: %s", obuf);
+#ifdef USE_IPV6
+{
+			char adr[INET6_ADDRSTRLEN];
+			inet_ntop(AF_INET6, &from.sin6_addr, adr, INET6_ADDRSTRLEN);
+			fprintf (stderr,"Remote: [%s]:%d\n", adr, g_ntohs(from.sin6_port));
+#else
 			fprintf (stderr,"Remote: %s:%d\n", inet_ntoa(from.sin_addr), g_ntohs(from.sin_port));
+#endif
 #endif
 		}
 	}
Index: Input/vorbis/http.c
===================================================================
RCS file: /cvs/xmms/Input/vorbis/http.c,v
retrieving revision 1.4
diff -u -r1.4 http.c
--- Input/vorbis/http.c	29 Dec 2001 19:03:38 -0000	1.4
+++ Input/vorbis/http.c	8 Apr 2002 19:05:52 -0000
@@ -287,8 +287,13 @@
 	gint cnt, written, error, err_len, port, cport;
 	gboolean redirect;
 	fd_set set;
+#ifdef USE_IPV6
+	struct addrinfo hints, *res, *res0;
+	char service[6];
+#else
 	struct hostent *hp;
 	struct sockaddr_in address;
+#endif
 	struct timeval tv;
 
 	url = (gchar *) arg;
@@ -310,6 +315,44 @@
 		chost = vorbis_cfg.use_proxy ? vorbis_cfg.proxy_host : host;
 		cport = vorbis_cfg.use_proxy ? vorbis_cfg.proxy_port : port;
 
+#ifdef USE_IPV6
+		snprintf(service, 6, "%d", cport);
+		memset(&hints, 0, sizeof(hints));
+		hints.ai_socktype = SOCK_STREAM;
+		if (! getaddrinfo(chost, service, &hints, &res0)) {
+			eof = TRUE;
+			for (res = res0; res; res = res->ai_next) {
+				if ((sock = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
+					continue;
+				fcntl(sock, F_SETFL, O_NONBLOCK);
+				status = g_strdup_printf(_("CONNECTING TO %s:%d"), chost, cport);
+				vorbis_ip.set_info_text(status);
+				g_free(status);
+				((struct sockaddr_in6 *)res->ai_addr)->sin6_port = htons(cport);
+				if (connect(sock, res->ai_addr, res->ai_addrlen) < 0) {
+					if (errno != EINPROGRESS) {
+						close(sock);
+						continue;
+					}
+				}
+				eof = FALSE;
+				break;
+			}
+			freeaddrinfo(res0);
+			if (eof) {
+				status = g_strdup_printf(_("Couldn't connect to host %s:%d"), chost, cport);
+				vorbis_ip.set_info_text(status);
+				g_free(status);
+				eof = TRUE;
+				break;
+			}
+		} else {
+			status = g_strdup_printf(_("Couldn't look up host %s"), chost);
+			vorbis_ip.set_info_text(status);
+			g_free(status);
+			eof = TRUE;
+		}
+#else
 		sock = socket(AF_INET, SOCK_STREAM, 0);
 		fcntl(sock, F_SETFL, O_NONBLOCK);
 		address.sin_family = AF_INET;
@@ -327,9 +370,11 @@
 			vorbis_ip.set_info_text(NULL);
 			eof = TRUE;
 		}
+#endif
 
 		if (!eof)
 		{
+#ifndef USE_IPV6
 			memcpy(&address.sin_addr.s_addr, *(hp->h_addr_list), sizeof (address.sin_addr.s_addr));
 			address.sin_port = g_htons(cport);
 
@@ -348,6 +393,7 @@
 					eof = TRUE;
 				}
 			}
+#endif
 			while (going)
 			{
 				tv.tv_sec = 0;




Information forwarded to debian-bugs-dist@lists.debian.org, Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org:
Bug#155955; Package xmms. (full text, mbox, link).


Acknowledgement sent to Wichert Akkerman <wichert@wiggy.net>:
Extra info received and forwarded to list. Copy sent to Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org. (full text, mbox, link).


Message #10 received at 155955@bugs.debian.org (full text, mbox, reply):

From: Wichert Akkerman <wichert@wiggy.net>
To: 155955@bugs.debian.org
Subject: Re: #155955: xmms: IPv6 support
Date: Sat, 4 Jan 2003 21:33:11 +0100
I am running xmms with this patch now and it works great. Both IPv4 and
IPV6 streams are working properly. Can you please merge this patch in a
new upload? (note that you need to run autoconf after applying the patch)

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker



Information forwarded to debian-bugs-dist@lists.debian.org, Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org:
Bug#155955; Package xmms. (full text, mbox, link).


Acknowledgement sent to Josip Rodin <joy@srce.hr>:
Extra info received and forwarded to list. Copy sent to Josip Rodin <jrodin@jagor.srce.hr>, xmms@packages.qa.debian.org. (full text, mbox, link).


Message #15 received at 155955@bugs.debian.org (full text, mbox, reply):

From: Josip Rodin <joy@srce.hr>
To: Fabio Massimo Di Nitto <fabbione@fabbione.net>, 155955@bugs.debian.org
Subject: Re: Bug#155955: xmms: IPv6 support
Date: Sun, 5 Jan 2003 00:36:40 +0100
On Thu, Aug 08, 2002 at 07:42:22PM +0200, Fabio Massimo Di Nitto wrote:
> 	the patch was found by Hasso Tepper at http://www.version6.net/
> It has been tested and it applies clean.

Please send it to the XMMS upstream.

-- 
     2. That which causes joy or happiness.



Noted your statement that Bug has been forwarded to http://bugs.xmms.org/show_bug.cgi?id=696. Request was from "J.H.M. Dassen (Ray)" <jdassen@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Reply sent to Josip Rodin <joy-packages@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to "Fabio Massimo Di Nitto" <fabbione@fabbione.net>:
Bug acknowledged by developer. (full text, mbox, link).


Message #22 received at 155955-close@bugs.debian.org (full text, mbox, reply):

From: Josip Rodin <joy-packages@debian.org>
To: 155955-close@bugs.debian.org
Subject: Bug#155955: fixed in xmms 1.2.7-2
Date: Thu, 27 Mar 2003 14:33:31 -0500
We believe that the bug you reported is fixed in the latest version of
xmms, which is due to be installed in the Debian FTP archive:

xmms-dev_1.2.7-2_i386.deb
  to pool/main/x/xmms/xmms-dev_1.2.7-2_i386.deb
xmms_1.2.7-2.diff.gz
  to pool/main/x/xmms/xmms_1.2.7-2.diff.gz
xmms_1.2.7-2.dsc
  to pool/main/x/xmms/xmms_1.2.7-2.dsc
xmms_1.2.7-2_i386.deb
  to pool/main/x/xmms/xmms_1.2.7-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 155955@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Josip Rodin <joy-packages@debian.org> (supplier of updated xmms package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat,  8 Mar 2003 19:45:13 +0100
Source: xmms
Binary: xmms-dev xmms
Architecture: source i386
Version: 1.2.7-2
Distribution: unstable
Urgency: low
Maintainer: Josip Rodin <joy-packages@debian.org>
Changed-By: Josip Rodin <joy-packages@debian.org>
Description: 
 xmms       - Versatile X audio player that looks like Winamp
 xmms-dev   - XMMS development static library and header files
Closes: 154652 155955 156660 183026
Changes: 
 xmms (1.2.7-2) unstable; urgency=low
 .
   * Acknowledging the NMU upload which fixed libvorbis issues,
     closes: #154652.
   * Recompiled with another new vorbis. *grumble*
   * Removed gnomexmms because it can no longer be compiled, it's
     not an applet compatible with GNOME 2.x, closes: #183026.
   * Register a MIME handler for audio/x-ogg, closes: #156660.
   * Added the IPv6 patch from http://bugs.xmms.org/show_bug.cgi?id=696,
     closes: #155955.
   * Used AM_MAINTAINER_MODE. Updated config.*.
Files: 
 6efed311c5d8b03ec6e94f6393158d1c 753 sound optional xmms_1.2.7-2.dsc
 ae8b67aa3c8a21770eb4cece199b746d 116229 sound optional xmms_1.2.7-2.diff.gz
 7a0f2573d2d2660b96180889a7a9ddcf 1493702 sound optional xmms_1.2.7-2_i386.deb
 58ecd3f35db078a9b7ea0514871697e8 27622 sound optional xmms-dev_1.2.7-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+g0zUC1RHoiANFZYRArOFAKCyFQDiWRv3DXs5m+Jpa8U7Z5OXGwCgpkBW
GSEFdHeJYZVdxSAOgt4ghVk=
=zJFY
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Oct 21 20:38:18 2017; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.