Skip to contentSkip to conversation

endianess fix for ip_conntrack_amanda

PATCH In review Jakub Bogusz 2 participants 2 messages Aug 5, 2003 – Aug 23, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 endianess fix for ip_conntrack_amanda

Hello,

I've just noticed that I probably missed one place (in ip_conntrack_amanda) when I was making fixes for big-endian archs in conntrack and nat modules by using C99 initializers in May, and it remained unfixed (at least in 2.6.0-test2, where all other fixes are already merged; probably the same in 2.4.22-pre).

So here is the missing element...

Signature · 2 lines
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Linux       http://www.pld-linux.org/

This is one more fix for big-endian problems in conntrack and nat modules, similar to those merged about two months ago (this one was missing).

Jakub Bogusz <[email protected]>

net/ipv4/netfilter/ip_conntrack_amanda.c renamed from net/ipv4/netfilter/ip_conntrack_amanda.c.orig +2 -2
@@ -133,11 +133,11 @@
 				{ { ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip,
 				    { 0 } },
 				  { ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip,
-				    { htons(exp_amanda_info->port) },
+				    { .tcp = { htons(exp_amanda_info->port) } },
 				    IPPROTO_TCP }});
 			expect.mask = ((struct ip_conntrack_tuple)
 				{ { 0, { 0 } },
-				  { 0xFFFFFFFF, { 0xFFFF }, 0xFFFF }});
+				  { 0xFFFFFFFF, { .tcp = { 0xFFFF } }, 0xFFFF }});
 
 			expect.expectfn = NULL;
 
#1 lore raw
Quoted 7 lines · Jakub Bogusz

Hello,

I've just noticed that I probably missed one place (in ip_conntrack_amanda) when I was making fixes for big-endian archs in conntrack and nat modules by using C99 initializers in May, and it remained unfixed (at least in 2.6.0-test2, where all other fixes are already merged; probably the same in 2.4.22-pre).

yes, indeed. Thanks for hunting this down - I will submit your patch soon.

Quoted 2 lines

Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
PLD Linux http://www.pld-linux.org/

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