Your message dated Wed, 09 Oct 2013 11:48:47 +0000
with message-id <e1vtsfz-0002vr...@franck.debian.org>
and subject line Bug#718894: fixed in nfqueue-bindings 0.4-6
has caused the Debian Bug report #718894,
regarding Signature for callback function changed, breaks everything including 
examples
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
718894: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718894
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-nfqueue
Version: 0.4-3
Severity: grave
Tags: patch

It seems package python-nfqueue included in Wheezy has changed the
call signature for the nfqueue callback function, breaking all programs
using the library, including the examples.

To reproduce, on a clean Wheezy machine:

a) install python-nfqueue:
# apt-get install python-nfqueue

b) create an iptables rule to queue all incoming ICMP pings to NFQUEUE number 0:
# iptables -t mangle -I PREROUTING -m icmp -p icmp --icmp-type 8 -j NFQUEUE 
--queue-num 0

c) Run one of the included examples:
# cd /usr/share/doc/python-nfqueue/examples
# apt-get install python-dpkt     # needed by the example
# ./example.py

d) then ping the host from a remote machine.
You'll see that calling the callback function fails with:
-- cut here --
# ./example.py
setting callback
open
trying to run
callback failure !
TypeError: cb() takes exactly 2 arguments (1 given)
callback failure !
TypeError: cb() takes exactly 2 arguments (1 given)
-- cut here --

The reason seems to be this commit:

-- cut here --
commit aa0e4e2b2ffd7848df9130e9eb5197797ba3363f
Author: Pierre Chifflier <chiffl...@edenwall.com>
Date:   Tue Aug 17 14:07:57 2010 +0200

    Fix memory leak in Python bindings

diff --git a/python/libnetfilter_queue_python.i 
b/python/libnetfilter_queue_python.i
index fa077b7..9b8b9c1 100644
--- a/python/libnetfilter_queue_python.i
+++ b/python/libnetfilter_queue_python.i
@@ -54,12 +54,9 @@ int  swig_nfq_callback(struct nfq_q_handle *qh, struct 
nfgenmsg *nfmsg,
                 p->id = id;
                 p->qh = qh;
                 p->nfad = nfad;
-                payload_obj = SWIG_NewPointerObj((void*) p, 
SWIGTYPE_p_payload, 1);
-                arglist = Py_BuildValue("(i,O)",42,payload_obj);
-                /*printf("will call python object\n");*/
+                payload_obj = SWIG_NewPointerObj((void*) p, 
SWIGTYPE_p_payload, 0 /* | SWIG_POINTER_OWN */);
+                arglist = Py_BuildValue("(N)",payload_obj);
                 result = PyEval_CallObject(func,arglist);
-                /*printf("result: %p\n", result);*/
-                free(p);
                 Py_DECREF(arglist);
                 if (result) {
                         Py_DECREF(result);
-- cut here --

Which modifies the call signature for the callback function, "(N)", vs. "(i,O").

After reverting the offending commit and rebuilding the debian package,
the example works properly:

-- cut here --
# ./example.py
setting callback
open
trying to run
python callback called !
  len 84 proto 1 src: xxx.xxx.x.xxx   dst yy.yyy.yyy.yy
-- cut here --

Marked bug as grave, since it makes all programs that depend on
python-nfqueue inoperable.

-- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-nfqueue depends on:
ii  libc6                2.13-38
ii  libnetfilter-queue1  0.0.17-1
ii  libnfnetlink0        1.0.0-1.1
ii  libpython2.6         2.6.8-1.1
ii  libpython2.7         2.7.3-6
ii  python               2.7.3-4
ii  python2.6            2.6.8-1.1
ii  python2.7            2.7.3-6

python-nfqueue recommends no packages.

python-nfqueue suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: nfqueue-bindings
Source-Version: 0.4-6

We believe that the bug you reported is fixed in the latest version of
nfqueue-bindings, which is due to be installed in the Debian FTP archive.

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 718...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Pierre Chifflier <pol...@debian.org> (supplier of updated nfqueue-bindings 
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 ftpmas...@ftp-master.debian.org)


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

Format: 1.8
Date: Wed, 09 Oct 2013 13:35:02 +0200
Source: nfqueue-bindings
Binary: libnfqueue-perl python-nfqueue nfqueue-bindings-perl 
nfqueue-bindings-python
Architecture: source amd64
Version: 0.4-6
Distribution: unstable
Urgency: low
Maintainer: Pierre Chifflier <pol...@debian.org>
Changed-By: Pierre Chifflier <pol...@debian.org>
Description: 
 libnfqueue-perl - Perl bindings for nfqueue
 nfqueue-bindings-perl - Perl bindings for nfqueue
 nfqueue-bindings-python - Python bindings for nfqueue
 python-nfqueue - Python bindings for nfqueue
Closes: 718894
Changes: 
 nfqueue-bindings (0.4-6) unstable; urgency=low
 .
   * Revert upstream signature change (Closes: #718894)
     Note: rollback is temporary, signature will change in next upstream
     version
Checksums-Sha1: 
 74147b20f068a05d923f8233e2a2827d50003eb0 1747 nfqueue-bindings_0.4-6.dsc
 96289b05a29af78124456395d8c321b1e8fd4e71 4776 
nfqueue-bindings_0.4-6.debian.tar.gz
 b4d548763b753b610d6cafeb3938b58a3e266127 24846 libnfqueue-perl_0.4-6_amd64.deb
 06e1a6353a5ce021e8a598fddd4c51f501e6d476 24164 python-nfqueue_0.4-6_amd64.deb
 a534009bc0e2714c0a3dc3b4d501c221eec46785 3076 
nfqueue-bindings-perl_0.4-6_amd64.deb
 2beb9e63d79dbb4aa413c245bdb5998a14585270 3082 
nfqueue-bindings-python_0.4-6_amd64.deb
Checksums-Sha256: 
 5008f705ce02dc0258af95bd8a4044dafbc93cc1dcd917cfadd160f85ba5ba56 1747 
nfqueue-bindings_0.4-6.dsc
 86b16619aeafda7ffaf121f001575283d1124ad3b00b877b1fe31acf43f67a83 4776 
nfqueue-bindings_0.4-6.debian.tar.gz
 eebba406bfaf62612a79ac07c447107cba76171c72faf79f729712319543b73a 24846 
libnfqueue-perl_0.4-6_amd64.deb
 8549e2dc4afbfda12c0b260c5a15f177effa1490c50c0a766bc1b0ca379b3b5f 24164 
python-nfqueue_0.4-6_amd64.deb
 49394b8b2dea7cfd8f00f25c166d8ad3a37561632d108cd7ce75506a02389a33 3076 
nfqueue-bindings-perl_0.4-6_amd64.deb
 83cbff67d77415a3c783fa5343b93bf162bbebc0f891e703ed289c00ae29ef43 3082 
nfqueue-bindings-python_0.4-6_amd64.deb
Files: 
 c07423cc48e19f4472ab4b6700a6ab85 1747 libs extra nfqueue-bindings_0.4-6.dsc
 bf4ee3da92bb6aaf918fb7dff6221c45 4776 libs extra 
nfqueue-bindings_0.4-6.debian.tar.gz
 f4bf5ec402c99b34b7c9d82b3ef22b00 24846 perl extra 
libnfqueue-perl_0.4-6_amd64.deb
 72f8e6c04897d3ee6b00d8c6946b22a1 24164 python extra 
python-nfqueue_0.4-6_amd64.deb
 e7b75bd5a389b77f19af577261293a87 3076 perl extra 
nfqueue-bindings-perl_0.4-6_amd64.deb
 f26ac225a1cf798fdefd2bd836e9105e 3082 python extra 
nfqueue-bindings-python_0.4-6_amd64.deb

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

iQEcBAEBAgAGBQJSVT+5AAoJEFqCeQfe0MQYAvAH/R90/l+LBKPm+LtSDYrb2Wfo
RuIXn7EmEJbZFA8H88du7oU6iPp9HTGckEChE32XLPKmmuQJRYlsrQ4C005l+lOC
f7wdLH7v6ol27utzsfgPxrU6VTeq3gVvvn9ta3oMPtXQO07KdunI26m66PYXmLX2
1EravPALYeaQ/f6Zw9iTsi5C1CzRWIknrOQktNVehNTqhTYNhP3CiaZvlSM4EIds
rOFDjoyHLOzaWsWOnLIQaTJUH9pnurD6feKIWVEdKA9iWdey/EkiDQeHw7wtxLCl
NZ3GSuhWre//uPI4YS6Qxnxn52yXG8ORtW9kpjXiaK9rzZUe0wGTNT/PE4RpppE=
=5JwI
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to