Skip to contentSkip to conversation

libnetfilter_conntrack broken on PPC

PATCH Victor Stinner 2 participants 2 messages Nov 16, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

Libnetfilter_conntrack doesn't work on PPC because a small bug in "getters" (8, 16, 32 bits). The problem only occurs on big endian architecture and is already fixed in subversion. My patch only fix big endian bug, and is very small ;-)

I sent the patch to Pablo Neira Ayuso the first october, but he looks very busy. Can someone else release a new version of libnetfilter_conntrack? If nobody cares, can I get the status of new libnetfilter_conntrack maintainer?

Victor Stinner
http://www.inl.fr/

src/conntrack/api.c +3 -3
@@ -304,7 +304,7 @@
 u_int8_t nfct_get_attr_u8(const struct nf_conntrack *ct,
 			  const enum nf_conntrack_attr type)
 {
-	const int *ret = nfct_get_attr(ct, type);
+	const u_int8_t *ret = nfct_get_attr(ct, type);
 	return ret == NULL ? 0 : *ret;
 }
 
@@ -320,7 +320,7 @@
 u_int16_t nfct_get_attr_u16(const struct nf_conntrack *ct,
 			    const enum nf_conntrack_attr type)
 {
-	const int *ret = nfct_get_attr(ct, type);
+	const u_int16_t *ret = nfct_get_attr(ct, type);
 	return ret == NULL ? 0 : *ret;
 }
 
@@ -336,7 +336,7 @@
 u_int32_t nfct_get_attr_u32(const struct nf_conntrack *ct,
 			    const enum nf_conntrack_attr type)
 {
-	const int *ret = nfct_get_attr(ct, type);
+	const u_int32_t *ret = nfct_get_attr(ct, type);
 	return ret == NULL ? 0 : *ret;
 }
 
#1 lore raw
Quoted 8 lines · Victor Stinner

Libnetfilter_conntrack doesn't work on PPC because a small bug in "getters" (8, 16, 32 bits). The problem only occurs on big endian architecture and is already fixed in subversion. My patch only fix big endian bug, and is very small ;-)

I sent the patch to Pablo Neira Ayuso the first october, but he looks very busy. Can someone else release a new version of libnetfilter_conntrack? If nobody cares, can I get the status of new libnetfilter_conntrack maintainer?

I'll do it along today.

Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers