Skip to contentSkip to conversation

iptables modifications for backwards compatibility

PATCH In review Rusty Russell 1 participant 1 message Nov 25, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 iptables modifications for backwards compatibility

1) final_check needs a pointer to the target/match so the size can be reduced for backwards compatibility.
2) MARK enhanced to take advantage of it.
3) iptables delete-matching-rule code needs to use size if it's less than the compare mask size (ie. was reduced by backwards compat code).

ip6tables.h +4 -2
Index: include/ip6tables.h
===================================================================
@@ -40,7 +40,8 @@
 		     struct ip6t_entry_match **match);
 
 	/* Final check; exit if not ok. */
-	void (*final_check)(unsigned int flags);
+	void (*final_check)(struct ip6t_entry_match *match,
+			    unsigned int flags);
 
 	/* Prints out the match iff non-NULL: put space at end */
 	void (*print)(const struct ip6t_ip6 *ip,
@@ -89,7 +90,8 @@
 		     struct ip6t_entry_target **target);
 	
 	/* Final check; exit if not ok. */
-	void (*final_check)(unsigned int flags);
+	void (*final_check)(struct ip6t_entry_target *target,
+			    unsigned int flags);
 
 	/* Prints out the target iff non-NULL: put space at end */
 	void (*print)(const struct ip6t_ip6 *ip,
linux/netfilter_ipv4/ipt_MARK.h +15 -1
Index: include/linux/netfilter_ipv4/ipt_MARK.h
===================================================================
@@ -1,12 +1,26 @@
 #ifndef _IPT_MARK_H_target
 #define _IPT_MARK_H_target
 
+struct ipt_mark_target_old_info {
+#ifdef KERNEL_64_USERSPACE_32
+	unsigned long long mark;
+#else
+	unsigned long mark;
+#endif
+};
+
+enum {
+	IPT_MARK_SET=0,
+	IPT_MARK_AND,
+	IPT_MARK_OR
+};
+
 struct ipt_mark_target_info {
 #ifdef KERNEL_64_USERSPACE_32
 	unsigned long long mark;
 #else
 	unsigned long mark;
 #endif
+	u_int8_t mode;
 };
-
 #endif /*_IPT_MARK_H_target*/
iptables.h +2 -2
Index: include/iptables.h
===================================================================
@@ -44,7 +44,7 @@
 		     struct ipt_entry_match **match);
 
 	/* Final check; exit if not ok. */
-	void (*final_check)(unsigned int flags);
+	void (*final_check)(struct ipt_entry_match *match, unsigned int flags);
 
 	/* Prints out the match iff non-NULL: put space at end */
 	void (*print)(const struct ipt_ip *ip,
@@ -93,7 +93,7 @@
 		     struct ipt_entry_target **target);
 
 	/* Final check; exit if not ok. */
-	void (*final_check)(unsigned int flags);
+	void (*final_check)(struct ipt_entry_target *target, unsigned int flags);
 
 	/* Prints out the target iff non-NULL: put space at end */
 	void (*print)(const struct ipt_ip *ip,
iptables.c +7 -4
Index: iptables.c
===================================================================
@@ -1420,9 +1420,11 @@
 	mptr = mask + sizeof(struct ipt_entry);
 
 	for (matchp = matches; matchp; matchp = matchp->next) {
+		size = matchp->match->userspacesize;
+		if (size > matchp->match->size)
+			size = matchp->match->size;
 		memset(mptr, 0xFF,
-		       IPT_ALIGN(sizeof(struct ipt_entry_match))
-		       + matchp->match->userspacesize);
+		       IPT_ALIGN(sizeof(struct ipt_entry_match)) + size);
 		mptr += IPT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->size;
 	}
 
@@ -2136,10 +2138,11 @@
 	}
 
 	for (matchp = matches; matchp; matchp = matchp->next)
-		matchp->match->final_check(matchp->match->mflags);
+		matchp->match->final_check(matchp->match->m,
+					   matchp->match->mflags);
 
 	if (target)
-		target->final_check(target->tflags);
+		target->final_check(target->t, target->tflags);
 
 	/* Fix me: must put inverse options checking here --MN */
 
libipt_account.c +1 -1
Index: extensions/libipt_account.c
===================================================================
@@ -214,7 +214,7 @@
 }
 
 /* Final check whether network/netmask was specified */
-static void final_check(unsigned int flags) {
+static void final_check(struct ipt_entry_match *match, unsigned int flags) {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "account: You need specify '--aaddr' parameter");
 }
libipt_connlimit.c +1 -1
Index: extensions/libipt_connlimit.c
===================================================================
@@ -79,7 +79,7 @@
 }
 
 /* Final check */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags & 1)
 		exit_error(PARAMETER_PROBLEM, "You must specify `--connlimit-above'");
libipt_ROUTE.c +1 -1
Index: extensions/libipt_ROUTE.c
===================================================================
@@ -149,7 +149,7 @@
 
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_pkttype.c +1 -1
Index: extensions/libipt_pkttype.c
===================================================================
@@ -114,7 +114,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "You must specify `--pkt-type'");
libipt_TTL.c +2 -2
Index: extensions/libipt_TTL.c
===================================================================
@@ -1,7 +1,7 @@
 /* Shared library add-on to iptables for the TTL target
  * (C) 2000 by Harald Welte <[email protected]>
  *
- * $Id: libipt_TTL.c,v 1.6 2002/05/29 13:08:16 laforge Exp $
+ * $Id$
  *
  * This program is distributed under the terms of GNU GPL
  */
@@ -89,7 +89,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!(flags & IPT_TTL_USED))
 		exit_error(PARAMETER_PROBLEM,
libip6t_random.c +1 -1
Index: extensions/libip6t_random.c
===================================================================
@@ -99,7 +99,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_CONNMARK.c +1 -1
Index: extensions/libipt_CONNMARK.c
===================================================================
@@ -119,7 +119,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_connmark.c +1 -1
Index: extensions/libipt_connmark.c
===================================================================
@@ -95,7 +95,7 @@
 
 /* Final check; must have specified --mark. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_IPV4OPTSSTRIP.c +1 -1
Index: extensions/libipt_IPV4OPTSSTRIP.c
===================================================================
@@ -39,7 +39,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_MIRROR.c +1 -1
Index: extensions/libipt_MIRROR.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_childlevel.c +1 -1
Index: extensions/libipt_childlevel.c
===================================================================
@@ -69,7 +69,7 @@
 }
 
 /* Final check; must have specified --level. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_ah.c +1 -1
Index: extensions/libip6t_ah.c
===================================================================
@@ -128,7 +128,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_conntrack.c +1 -1
Index: extensions/libipt_conntrack.c
===================================================================
@@ -345,7 +345,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "You must specify one or more options");
libipt_physdev.c +1 -1
Index: extensions/libipt_physdev.c
===================================================================
@@ -152,7 +152,7 @@
 
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (flags == 0)
 		exit_error(PARAMETER_PROBLEM, "PHYSDEV: no physdev option specified");
libip6t_multiport.c +1 -1
Index: extensions/libip6t_multiport.c
===================================================================
@@ -155,7 +155,7 @@
 
 /* Final check; must specify something. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "multiport expection an option");
libipt_multiport.c +1 -1
Index: extensions/libipt_multiport.c
===================================================================
@@ -155,7 +155,7 @@
 
 /* Final check; must specify something. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "multiport expection an option");
libipt_REDIRECT.c +1 -1
Index: extensions/libipt_REDIRECT.c
===================================================================
@@ -107,7 +107,7 @@
 }
 
 /* Final check; don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_addrtype.c +1 -1
Index: extensions/libipt_addrtype.c
===================================================================
@@ -122,7 +122,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!(flags & (IPT_ADDRTYPE_OPT_SRCTYPE|IPT_ADDRTYPE_OPT_DSTTYPE)))
 		exit_error(PARAMETER_PROBLEM,
libipt_CLASSIFY.c +1 -1
Index: extensions/libipt_CLASSIFY.c
===================================================================
@@ -72,7 +72,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_fuzzy.c +1 -1
Index: extensions/libip6t_fuzzy.c
===================================================================
@@ -111,7 +111,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_length.c +1 -1
Index: extensions/libipt_length.c
===================================================================
@@ -100,7 +100,7 @@
 
 /* Final check; must have specified --length. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_hashlimit.c +1 -1
Index: extensions/libipt_hashlimit.c
===================================================================
@@ -237,7 +237,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!(flags & PARAM_LIMIT))
 		exit_error(PARAMETER_PROBLEM,
libipt_fuzzy.c +1 -1
Index: extensions/libipt_fuzzy.c
===================================================================
@@ -110,7 +110,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_MASQUERADE.c +1 -1
Index: extensions/libipt_MASQUERADE.c
===================================================================
@@ -107,7 +107,7 @@
 }
 
 /* Final check; don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_DSCP.c +1 -1
Index: extensions/libipt_DSCP.c
===================================================================
@@ -108,7 +108,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_MARK.c +67 -17

137 lines not on this page · raw message

libipt_set.c +1 -1
Index: extensions/libipt_set.c
===================================================================
@@ -79,7 +79,7 @@
 }
 
 /* Final check; must have specified --set. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_realm.c +1 -1
Index: extensions/libipt_realm.c
===================================================================
@@ -106,7 +106,7 @@
 
 /* Final check; must have specified --mark. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_standard.c +1 -1
Index: extensions/libipt_standard.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 /* Final check; don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_connbytes.c +1 -1
Index: extensions/libipt_connbytes.c
===================================================================
@@ -81,7 +81,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "You must specify `--connbytes'");
libipt_tos.c +1 -1
Index: extensions/libipt_tos.c
===================================================================
@@ -121,7 +121,7 @@
 
 /* Final check; must have specified --tos. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_LOG.c +1 -1
Index: extensions/libip6t_LOG.c
===================================================================
@@ -176,7 +176,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 }
 
libipt_POOL.c +1 -1
Index: extensions/libipt_POOL.c
===================================================================
@@ -87,7 +87,7 @@
 }
 
 /* Final check; don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_TCPLAG.c +1 -1
Index: extensions/libipt_TCPLAG.c
===================================================================
@@ -163,7 +163,7 @@
  *
  * In this case, no errors are possible
  */
-static void final_check( unsigned int flags ) { }
+static void final_check(struct ipt_entry_target *target, unsigned int flags ) { }
 /*
  * This print is for the purpose of user-readable display
  * such as what "iptables -L" would give. The notes in
libipt_FTOS.c +1 -1
Index: extensions/libipt_FTOS.c
===================================================================
@@ -77,7 +77,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_udp.c +1 -1
Index: extensions/libip6t_udp.c
===================================================================
@@ -133,7 +133,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_recent.c +1 -1
Index: extensions/libipt_recent.c
===================================================================
@@ -165,7 +165,7 @@
 
 /* Final check; must have specified a specific option. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 
 	if (!flags)
libipt_random.c +1 -1
Index: extensions/libipt_random.c
===================================================================
@@ -98,7 +98,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_unclean.c +1 -1
Index: extensions/libipt_unclean.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 /* Final check; must have specified --mac. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_ah.c +1 -1
Index: extensions/libipt_ah.c
===================================================================
@@ -107,7 +107,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_dstlimit.c +1 -1
Index: extensions/libipt_dstlimit.c
===================================================================
@@ -218,7 +218,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!(flags & PARAM_LIMIT))
 		exit_error(PARAMETER_PROBLEM,
libipt_nth.c +1 -1
Index: extensions/libipt_nth.c
===================================================================
@@ -176,7 +176,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_mac.c +1 -1
Index: extensions/libipt_mac.c
===================================================================
@@ -97,7 +97,7 @@
 }
 
 /* Final check; must have specified --mac. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_TARPIT.c +1 -1
Index: extensions/libipt_TARPIT.c
===================================================================
@@ -30,7 +30,7 @@
 	return 0;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_ttl.c +2 -2
Index: extensions/libipt_ttl.c
===================================================================
@@ -1,7 +1,7 @@
 /* Shared library add-on to iptables to add TTL matching support 
  * (C) 2000 by Harald Welte <[email protected]>
  *
- * $Id: libipt_ttl.c,v 1.6 2002/05/29 13:08:16 laforge Exp $
+ * $Id$
  *
  * This program is released under the terms of GNU GPL */
 
@@ -82,7 +82,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags) 
 		exit_error(PARAMETER_PROBLEM,
libipt_SNAT.c +1 -1
Index: extensions/libipt_SNAT.c
===================================================================
@@ -167,7 +167,7 @@
 }
 
 /* Final check; must have specfied --to-source. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_tcpmss.c +1 -1
Index: extensions/libipt_tcpmss.c
===================================================================
@@ -106,7 +106,7 @@
 
 /* Final check; must have specified --mss. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_connrate.c +1 -1
Index: extensions/libipt_connrate.c
===================================================================
@@ -113,7 +113,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!(flags & CONNRATE_OPT))
 		exit_error(PARAMETER_PROBLEM,
libip6t_tcp.c +1 -1
Index: extensions/libip6t_tcp.c
===================================================================
@@ -252,7 +252,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_state.c +1 -1
Index: extensions/libipt_state.c
===================================================================
@@ -97,7 +97,7 @@
 }
 
 /* Final check; must have specified --state. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "You must specify `--state'");
libip6t_MARK.c +1 -1
Index: extensions/libip6t_MARK.c
===================================================================
@@ -65,7 +65,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_owner.c +1 -1
Index: extensions/libip6t_owner.c
===================================================================
@@ -198,7 +198,7 @@
 
 /* Final check; must have specified --own. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_dst.c +1 -1
Index: extensions/libip6t_dst.c
===================================================================
@@ -182,7 +182,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_IPMARK.c +1 -1
Index: extensions/libipt_IPMARK.c
===================================================================
@@ -105,7 +105,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!(flags & IPT_ADDR_USED))
 		exit_error(PARAMETER_PROBLEM,
libip6t_standard.c +1 -1
Index: extensions/libip6t_standard.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 /* Final check; don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 }
 
libipt_esp.c +1 -1
Index: extensions/libipt_esp.c
===================================================================
@@ -107,7 +107,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libip6t_HL.c +1 -1
Index: extensions/libip6t_HL.c
===================================================================
@@ -89,7 +89,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 	if (!(flags & IP6T_HL_USED))
 		exit_error(PARAMETER_PROBLEM,
libipt_owner.c +1 -1
Index: extensions/libipt_owner.c
===================================================================
@@ -199,7 +199,7 @@
 
 /* Final check; must have specified --own. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_mport.c +1 -1
Index: extensions/libipt_mport.c
===================================================================
@@ -176,7 +176,7 @@
 
 /* Final check; must specify something. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "mport expects an option");
libip6t_REJECT.c +1 -1
Index: extensions/libip6t_REJECT.c
===================================================================
@@ -116,7 +116,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 }
 
libipt_NETLINK.c +1 -1
Index: extensions/libipt_NETLINK.c
===================================================================
@@ -96,7 +96,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	/* ?? */
 }
libipt_ECN.c +2 -2
Index: extensions/libipt_ECN.c
===================================================================
@@ -6,7 +6,7 @@
  *
  * libipt_ECN.c borrowed heavily from libipt_DSCP.c
  *
- * $Id: libipt_ECN.c,v 1.11 2002/08/07 10:04:42 laforge Exp $
+ * $Id$
  */
 #include <stdio.h>
 #include <string.h>
@@ -105,7 +105,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_physdev.c +1 -1
Index: extensions/libip6t_physdev.c
===================================================================
@@ -152,7 +152,7 @@
 
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (flags == 0)
 		exit_error(PARAMETER_PROBLEM, "PHYSDEV: no physdev option specified");
libipt_sctp.c +1 -1
Index: extensions/libipt_sctp.c
===================================================================
@@ -335,7 +335,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_u32.c +1 -1
Index: extensions/libipt_u32.c
===================================================================
@@ -229,7 +229,7 @@
 
 /* Final check; must specify something. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libip6t_rt.c +1 -1
Index: extensions/libip6t_rt.c
===================================================================
@@ -240,7 +240,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libip6t_condition.c +1 -1
Index: extensions/libip6t_condition.c
===================================================================
@@ -63,7 +63,7 @@
 
 
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_eui64.c +1 -1
Index: extensions/libip6t_eui64.c
===================================================================
@@ -46,7 +46,7 @@
 }
 
 /* Final check */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_record_rpc.c +1 -1
Index: extensions/libipt_record_rpc.c
===================================================================
@@ -36,7 +36,7 @@
 }
 
 /* Final check; must have specified --mac. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_rpc.c +1 -1
Index: extensions/libipt_rpc.c
===================================================================
@@ -302,7 +302,7 @@
 }
 
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (flags != (flags | IPT_RPC_RPCS)) {
 		printf("%s option \"--rpcs\" was not used ... reverting ", preerr);
libipt_SAME.c +1 -1
Index: extensions/libipt_SAME.c
===================================================================
@@ -125,7 +125,7 @@
 }
 
 /* Final check; need --to. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!(flags & IPT_SAME_OPT_TO))
 		exit_error(PARAMETER_PROBLEM,
libipt_condition.c +1 -1
Index: extensions/libipt_condition.c
===================================================================
@@ -63,7 +63,7 @@
 
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_icmp.c +1 -1
Index: extensions/libipt_icmp.c
===================================================================
@@ -283,7 +283,7 @@
 }
 
 /* Final check; we don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_quota.c +1 -1
Index: extensions/libipt_quota.c
===================================================================
@@ -89,7 +89,7 @@
 
 /* no final check */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libip6t_frag.c +1 -1
Index: extensions/libip6t_frag.c
===================================================================
@@ -159,7 +159,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_string.c +1 -1
Index: extensions/libipt_string.c
===================================================================
@@ -185,7 +185,7 @@
 
 /* Final check; must have specified --string. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_ULOG.c +1 -1
Index: extensions/libipt_ULOG.c
===================================================================
@@ -151,7 +151,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_XOR.c +1 -1
Index: extensions/libipt_XOR.c
===================================================================
@@ -61,7 +61,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!(flags & IPT_KEY_SET))
 		exit_error(PARAMETER_PROBLEM, "XOR: You must specify a key");
libipt_TCPMSS.c +1 -1
Index: extensions/libipt_TCPMSS.c
===================================================================
@@ -79,7 +79,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_ipv6header.c +1 -1
Index: extensions/libip6t_ipv6header.c
===================================================================
@@ -227,7 +227,7 @@
 
 /* Checks the flags variable */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags) exit_error(PARAMETER_PROBLEM, "ip6t_ipv6header: no options specified");
 }
libipt_dscp.c +1 -1
Index: extensions/libipt_dscp.c
===================================================================
@@ -118,7 +118,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_hl.c +1 -1
Index: extensions/libip6t_hl.c
===================================================================
@@ -87,7 +87,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags) 
 		exit_error(PARAMETER_PROBLEM,
libip6t_icmpv6.c +1 -1
Index: extensions/libip6t_icmpv6.c
===================================================================
@@ -253,7 +253,7 @@
 }
 
 /* Final check; we don't care. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_mark.c +1 -1
Index: extensions/libipt_mark.c
===================================================================
@@ -95,7 +95,7 @@
 
 /* Final check; must have specified --mark. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_ipv4options.c +1 -1
Index: extensions/libipt_ipv4options.c
===================================================================
@@ -225,7 +225,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (flags == 0)
 		exit_error(PARAMETER_PROBLEM,
libipt_time.c +1 -1
Index: extensions/libipt_time.c
===================================================================
@@ -417,7 +417,7 @@
 
 /* Final check */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	/* Nothing to do */
 }
libipt_comment.c +1 -1
Index: extensions/libipt_comment.c
===================================================================
@@ -77,7 +77,7 @@
 
 /* Final check; must have specified --comment. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_pool.c +1 -1
Index: extensions/libipt_pool.c
===================================================================
@@ -79,7 +79,7 @@
 }
 
 /* Final check; must have specified --srcpool or --dstpool. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "You must specify either `--srcpool or --dstpool'");
libipt_REJECT.c +1 -1
Index: extensions/libipt_REJECT.c
===================================================================
@@ -135,7 +135,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libip6t_nth.c +1 -1
Index: extensions/libip6t_nth.c
===================================================================
@@ -176,7 +176,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_helper.c +1 -1
Index: extensions/libipt_helper.c
===================================================================
@@ -60,7 +60,7 @@
 
 /* Final check; must have specified --helper. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_LOG.c +1 -1
Index: extensions/libipt_LOG.c
===================================================================
@@ -176,7 +176,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libip6t_TRACE.c +1 -1
Index: extensions/libip6t_TRACE.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 }
 
libipt_NETMAP.c +1 -1
Index: extensions/libipt_NETMAP.c
===================================================================
@@ -142,7 +142,7 @@
 }
 
 /* Final check; need --to */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_BALANCE.c +1 -1
Index: extensions/libipt_BALANCE.c
===================================================================
@@ -91,7 +91,7 @@
 }
 
 /* Final check; need --to-dest. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_mac.c +1 -1
Index: extensions/libip6t_mac.c
===================================================================
@@ -97,7 +97,7 @@
 }
 
 /* Final check; must have specified --mac. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_udp.c +1 -1
Index: extensions/libipt_udp.c
===================================================================
@@ -133,7 +133,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_SET.c +1 -1
Index: extensions/libipt_SET.c
===================================================================
@@ -100,7 +100,7 @@
 }
 
 /* Final check; must specify at least one. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_TRACE.c +1 -1
Index: extensions/libipt_TRACE.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libipt_NOTRACK.c +1 -1
Index: extensions/libipt_NOTRACK.c
===================================================================
@@ -37,7 +37,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 }
 
libip6t_limit.c +1 -1
Index: extensions/libip6t_limit.c
===================================================================
@@ -130,7 +130,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_ecn.c +1 -1
Index: extensions/libipt_ecn.c
===================================================================
@@ -93,7 +93,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_TOS.c +1 -1
Index: extensions/libipt_TOS.c
===================================================================
@@ -109,7 +109,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_length.c +1 -1
Index: extensions/libip6t_length.c
===================================================================
@@ -102,7 +102,7 @@
 
 /* Final check; must have specified --length. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_CLUSTERIP.c +1 -1
Index: extensions/libipt_CLUSTERIP.c
===================================================================
@@ -151,7 +151,7 @@
 }
 
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (flags == 0)
 		return;
libip6t_esp.c +1 -1
Index: extensions/libip6t_esp.c
===================================================================
@@ -106,7 +106,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
libipt_limit.c +1 -1
Index: extensions/libipt_limit.c
===================================================================
@@ -130,7 +130,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libip6t_mark.c +1 -1
Index: extensions/libip6t_mark.c
===================================================================
@@ -95,7 +95,7 @@
 
 /* Final check; must have specified --mark. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libip6t_ROUTE.c +1 -1
Index: extensions/libip6t_ROUTE.c
===================================================================
@@ -129,7 +129,7 @@
 
 
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_iprange.c +1 -1
Index: extensions/libipt_iprange.c
===================================================================
@@ -110,7 +110,7 @@
 
 /* Final check; must have specified --src-range or --dst-range. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_psd.c +1 -1
Index: extensions/libipt_psd.c
===================================================================
@@ -142,7 +142,7 @@
 }
 
 /* Final check; nothing. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_DNAT.c +1 -1
Index: extensions/libipt_DNAT.c
===================================================================
@@ -167,7 +167,7 @@
 }
 
 /* Final check; must have specfied --to-source. */
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_target *target, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM,
libipt_tcp.c +1 -1
Index: extensions/libipt_tcp.c
===================================================================
@@ -252,7 +252,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 }
 
libipt_osf.c +1 -1
Index: extensions/libipt_osf.c
===================================================================
@@ -115,7 +115,7 @@
 	return 1;
 }
 
-static void final_check(unsigned int flags)
+static void final_check(struct ipt_entry_match *match, unsigned int flags)
 {
 	if (!flags)
 		exit_error(PARAMETER_PROBLEM, "OS fingerprint match: You must specify `--genre'");
libip6t_hbh.c +1 -1
Index: extensions/libip6t_hbh.c
===================================================================
@@ -180,7 +180,7 @@
 
 /* Final check; we don't care. */
 static void
-final_check(unsigned int flags)
+final_check(struct ip6t_entry_match *match, unsigned int flags)
 {
 }
 
Signature · 1 line
A bad analogy is like a leaky screwdriver -- Richard Braakman