Bug#530783: uruk: IPv6 logging doesn't work

2009-06-17 Thread Joost van Baal
Op Wed 27 May 2009 om 08:57:59 +0100 schreef Matthew King:
 
 IPv6 logging isn't configured and attempting to start uruk with ivp6
 enabled reports:
 
 ip6tables v1.3.6: host/network `[IPv4 IP]' not found
 Try `ip6tables -h' or 'ip6tables --help' for more information.
 
 The -j LOG entry is therefore not added to the firewall and potentially
 important information is lost.

Thanks a lot for this bugreport.  The patch looks good.  It'll likely take a
while before I get to uploading a fixed uruk: I am pretty busy.  Anyway, this
will surely make it into Debian before squeeze is released.  (FWIW: I do not
object to an NMU.)

Bye,

Joost




signature.asc
Description: Digital signature


Bug#530783: uruk: IPv6 logging doesn't work

2009-05-27 Thread Matthew King
Package: uruk
Version: 20051129-1
Severity: important
Tags: patch


IPv6 logging isn't configured and attempting to start uruk with ivp6
enabled reports:

ip6tables v1.3.6: host/network `[IPv4 IP]' not found
Try `ip6tables -h' or 'ip6tables --help' for more information.

The -j LOG entry is therefore not added to the firewall and potentially
important information is lost.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i386)

Kernel: Linux 2.6.23.1-bytemark-uml
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- script/uruk.in  2005-10-27 11:32:40.0 +0100
+++ script/uruk-new.in  2009-05-27 20:50:56.0 +0100
@@ -60,9 +60,15 @@
 fi
 fi
 
+uruk_log4 () {
+$iptables -A INPUT -j LOG --log-level debug --log-prefix 'iptables: ' $@
+}
+uruk_log6 () {
+$ip6tables -A INPUT -j LOG --log-level debug --log-prefix 'ip6tables: ' 
$@
+}
 uruk_log () {
-$iptables -A INPUT -j LOG --log-level debug --log-prefix 'iptables: ' $@
-$ip6tables -A INPUT -j LOG --log-level debug --log-prefix 'ip6tables: ' $@
+uruk_log4 $@
+uruk_log6 $@
 }
 
 #
@@ -345,7 +351,9 @@
 for iface_x in $interfaces_x
 do
 eval ip=\\$ip_${iface_x}\
-uruk_log -i $iface --destination $ip
+eval ip6=\\$ip6_${iface_x}\
+uruk_log4 -i $iface --destination $ip
+uruk_log6 -i $iface --destination $ip6
 done
 done
 elif test $loglevel -lt 60