Skip to contentSkip to conversation

ip6tables broken

DISCUSSION Patrick McHardy 1 participant 2 messages Apr 15, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

Using the net-2.6.26.git/latest SVN tree I get:

[96565.511804] ip6_tables: MARK target: invalid size 4 != 8
[96565.536937] ip6_tables: MARK target: invalid size 4 != 8
[96565.570762] ip6_tables: MARK target: invalid size 4 != 8

Userspace chooses revision 2, the kernel apparently revision 0. I'm pretty certain this is some fallout from your latest patches.

#1 lore raw
Quoted 8 lines · Patrick McHardy

Using the net-2.6.26.git/latest SVN tree I get:

[96565.511804] ip6_tables: MARK target: invalid size 4 != 8
[96565.536937] ip6_tables: MARK target: invalid size 4 != 8
[96565.570762] ip6_tables: MARK target: invalid size 4 != 8

Userspace chooses revision 2, the kernel apparently revision 0. I'm pretty certain this is some fallout from your latest patches.

Actually it was the other way around, ip6tables was missing the code to set the revision for targets. This patch resyncs with iptables.

ip6tables.c +8 -1
Index: ip6tables.c
===================================================================
@@ -1393,9 +1393,16 @@
 				target->t = fw_calloc(1, size);
 				target->t->u.target_size = size;
 				strcpy(target->t->u.user.name, jumpto);
+				set_revision(target->t->u.user.name,
+					     target->revision);
 				if (target->init != NULL)
 					target->init(target->t);
-				opts = merge_options(opts, target->extra_opts, &target->option_offset);
+				opts = merge_options(opts,
+						     target->extra_opts,
+						     &target->option_offset);
+				if (opts == NULL)
+					exit_error(OTHER_PROBLEM,
+						   "can't alloc memory!");
 			}
 			break;