Package: vdr-plugin-live
Version: 0.2.0-3.1
Severity: important
Tags: patch

TNTnet can listen on IPv6, but the setup routine of vdr-plugin-live refuses to 
pass them to the autogenerated TNTnet config file.

Attached patch expands the IP check to also allow IPv6 addresses and changes 
the default address from 0.0.0.0 to ::.

I'd like to have this in lenny as IPv6 support is release goal.


Timo


--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.16.62

Debian Release: lenny/sid
  500 unstable        www.debian-multimedia.org 
  500 testing         www.debian-multimedia.org 

--- Package information. ---
Depends                     (Version) | Installed
=====================================-+-=============
libc6                      (>= 2.7-1) | 2.7-13
libcxxtools6                          | 1.4.8-2
libgcc1                  (>= 1:4.1.1) | 1:4.3.1-2
libstdc++6                 (>= 4.2.1) | 4.3.1-2
libtntnet8                            | 1.6.3-3
vdr-abi-1.6.0-debian                  | 

--- a/setup.cpp	2008-04-23 01:01:53.000000000 +0200
+++ b/setup.cpp	2008-08-28 16:50:14.000000000 +0200
@@ -151,16 +151,20 @@
 
 bool Setup::CheckServerIps()
 {
+	struct in6_addr buf;
+
 	if ( m_serverIps.empty() ) {
-		m_serverIps.push_back( "0.0.0.0" );
+		m_serverIps.push_back( "::" );
 		return true;
 	}
 
 	for ( IpList::const_iterator ip = m_serverIps.begin(); ip != m_serverIps.end(); ++ip ) {
 		if ( inet_addr( ip->c_str() ) == static_cast< in_addr_t >( -1 ) ) {
-			esyslog( "ERROR: live server ip %s is not a valid ip address", ip->c_str() );
-			cerr << "ERROR: live server ip " << *ip << " is not a valid ip address" << endl;
-			return false;
+			if ( ! inet_pton( AF_INET6, ip->c_str(), &buf ) ) {
+				esyslog( "ERROR: live server ip %s is not a valid ip address", ip->c_str() );
+				cerr << "ERROR: live server ip " << *ip << " is not a valid ip address" << endl;
+				return false;
+			}
 		}
 	}
 	return true;

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to