Skip to contentSkip to conversation

QUEUE on Alpha not working?

PATCH In review Ryan Veety 3 participants 5 messages Sep 4, 2003 – Sep 7, 2003 netfilter

lore
Share & tools
lore

Ryan Veety

author
#0 lore raw

My DEC Alpha Multia is running debian unstable with kernel 2.4.21. All code that uses libipq fails. ipq_message_type returns NLMSG_ERROR for every packet. Even the intercept tool from the netfilter testsuite (CVS) fails:

# ./intercept FORWARD ACCEPT 10 10
EEEEEEEEEEEEEEEEE<snip>
Received error message 2

The ip_queue and netlink_dev modules are loaded. I get the same result with kernel 2.4.18, iptables 1.2.8, and iptables from CVS. The same code (testsuite and my own) works fine on x86 machines. Any ideas?

Thanks
Ryan

     __________________________________________________________
   .'  Ryan Veety <[email protected]> - http://www.ryanspc.com  `.
   |          PGP Key: http://www.ryanspc.com/pgp.txt           |
    `----------------------------------------------------------'
#1 lore raw
Quoted 3 lines · Ryan Veety

My DEC Alpha Multia is running debian unstable with kernel 2.4.21. All code that uses libipq fails. ipq_message_type returns NLMSG_ERROR for every packet. Even the intercept tool from the netfilter testsuite (CVS) fails:

can you please submit this to bugzilla.netfilter.org?

James Morris (the ip_queue author) is currently moving from one continent to another... so it could take some time until he can have a look.

if it is in bugzilla, it will at least not get lost...

Quoted 2 lines

Thanks
Ryan

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
author
#2 lore raw

PATCH 1/1 was Re: QUEUE on Alpha not working?

Quoted 10 lines · Harald Welte
Quoted 3 lines · Ryan Veety

My DEC Alpha Multia is running debian unstable with kernel 2.4.21. All code that uses libipq fails. ipq_message_type returns NLMSG_ERROR for every packet. Even the intercept tool from the netfilter testsuite (CVS) fails:

can you please submit this to bugzilla.netfilter.org?

James Morris (the ip_queue author) is currently moving from one continent to another... so it could take some time until he can have a look.

Instead of filing the bug report I decided to hunt down the bug. The problem was in the libipq.h header, where it assumed if the architecture was not 64bit kernel/32bit userspace that the userspace must be 32bit for the ipq_id_t type. I instead defined ipq_id_t the same way it is in the kernel code, as unsigned long. Now libipq should work everywhere (I'm assuming it was also broken on other 64bit cpus).

--- netfilter-orig/userspace/include/libipq/libipq.h 2003-09-06
20:45:40.000000000 -0400
+++ netfilter/userspace/include/libipq/libipq.h 2003-09-06 20:44:50.000000000 -0400
@@ -35,7 +35,7 @@
typedef u_int64_t ipq_id_t;
#else
#include <linux/netfilter_ipv4/ip_queue.h>
-typedef u_int32_t ipq_id_t;
+typedef unsigned long ipq_id_t;
#endif

#ifdef DEBUG_LIBIPQ

Ryan

     __________________________________________________________
   .'  Ryan Veety <[email protected]> - http://www.ryanspc.com  `.
   |          PGP Key: http://www.ryanspc.com/pgp.txt           |
    `----------------------------------------------------------'
#3 lore raw

Re: [PATCH] was Re: QUEUE on Alpha not working?

Quoted 8 lines · Ryan Veety
Quoted 6 lines · Harald Welte
Quoted 4 lines · Ryan Veety

My DEC Alpha Multia is running debian unstable with kernel 2.4.21. All code that uses libipq fails. ipq_message_type returns NLMSG_ERROR for every packet. Even the intercept tool from the netfilter testsuite (CVS) fails:

Quoted 7 lines
Quoted 5 lines

can you please submit this to bugzilla.netfilter.org?

James Morris (the ip_queue author) is currently moving from one continent to another... so it could take some time until he can have a look.

Instead of filing the bug report I decided to hunt down the bug.

Thank you!

Quoted 6 lines

The problem was in the libipq.h header, where it assumed if the architecture was not 64bit kernel/32bit userspace that the userspace must be 32bit for the ipq_id_t type. I instead defined ipq_id_t the same way it is in the kernel code, as unsigned long. Now libipq should work everywhere (I'm assuming it was also broken on other 64bit cpus).

yes, indeed. Your findings seem correct to me. I will apply your patch to our CVS repository.

I'm Cc'ing James Morris for reference (and am thus qouting your patch again).

Quoted 15 lines

--- netfilter-orig/userspace/include/libipq/libipq.h 2003-09-06
20:45:40.000000000 -0400
+++ netfilter/userspace/include/libipq/libipq.h 2003-09-06 20:44:50.000000000 -0400

(quoted diff) +1 -1
@@ -35,7 +35,7 @@
 typedef u_int64_t ipq_id_t;
 #else
 #include <linux/netfilter_ipv4/ip_queue.h>
-typedef u_int32_t ipq_id_t;
+typedef unsigned long ipq_id_t;
 #endif
 
 #ifdef DEBUG_LIBIPQ

Ryan

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#4 lore raw

Re: [PATCH] was Re: QUEUE on Alpha not working?

Quoted 3 lines · Harald Welte

yes, indeed. Your findings seem correct to me. I will apply your patch to our CVS repository.

Looks correct to me as well.

- James

Signature · 2 lines
James Morris
<[email protected]>