Skip to contentSkip to conversation

Fix for u32 patchlet and kernel 2.6.21

PATCH Applied Thomas Jarosch 3 participants 7 messages Apr 26, 2007 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for u32 patchlet and kernel 2.6.21

Hello,

attached is a small patch to get the u32 patchlet
running again with kernel 2.6.21.

Cheers,
Thomas

Signed-Off: Thomas Jarosch <[email protected]>

ipt_u32.c +4 -3
diff -u -p u32.old/ipt_u32.c u32/ipt_u32.c
@@ -214,8 +214,9 @@ checkentry(const char *tablename,
 	return 1;
 }
 
-static struct ipt_match u32_match = { 
+static struct xt_match u32_match = { 
 	.name 		= "u32",
+	.family         = AF_INET,
 	.match		= &match,
 	.matchsize	= sizeof(struct ipt_u32),
 	.checkentry	= &checkentry,
@@ -224,12 +225,12 @@ static struct ipt_match u32_match = { 
 
 static int __init init(void)
 {
-	return ipt_register_match(&u32_match);
+	return xt_register_match(&u32_match);
 }
 
 static void __exit fini(void)
 {
-	ipt_unregister_match(&u32_match);
+	xt_unregister_match(&u32_match);
 }
 
 module_init(init);
#6 lore raw
In reply to Thomas Jarosch
Quoted 4 lines · Thomas Jarosch

Hello,

attached is a small patch to get the u32 patchlet
running again with kernel 2.6.21.

Applied, thanks Thomas. But please make sure your patches apply with -p1 in the patch-o-matic-ng directory for future patches.

#4 lore raw
Quoted 6 lines · Patrick McHardy
Quoted 5 lines · Thomas Jarosch
Quoted 1 line · Jan Engelhardt

See http://lists.netfilter.org/pipermail/netfilter/2007-April/068389.html

Quoted 7 lines
Quoted 2 lines

Now I got it. You posted the patches to netfilter instead of netfilter-devel. No wonder I have missed it on -devel :-)

Same here, I don't read netfilter, so in case anything of them is relevant for netfilter SVN and you want me to apply them, please resend to netfilter-devel.

Is #ifdef kludgery for different kernel versions 'allowed' in pom?

Jan

#5 lore raw
Quoted 8 lines · Jan Engelhardt
Quoted 3 lines · Patrick McHardy

Same here, I don't read netfilter, so in case anything of them is relevant for netfilter SVN and you want me to apply them, please resend to netfilter-devel.

Is #ifdef kludgery for different kernel versions 'allowed' in pom?

No, we decided to keep only versions for the latest kernel around. You could add a include file that hides the version magic though, I guess other people would be happy to have something like that too.