Skip to contentSkip to conversation

libipt_ROUTE.c : compilation errors

PATCH New Cédric de Launois 1 participant 1 message Jun 17, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libipt_ROUTE.c : compilation errors

I promise this is my last patch for today...

Here's a patch to fix two (harmless, but obviously wrong) compilation errors in libipt_ROUTE.c. I used NETFILTER_VERSION where all extensions are now using IPTABLES_VERSION, and I used the old two-argument check_invert() where this function now has a four-argument form.
Thanks Patrick !

I wasn't using the last cvs version when I programmed these lines...

The patch is against the current cvs tree.

Cédric

diff -Nru netfilter.orig/userspace/extensions/libipt_ROUTE.c netfilter/userspace/extensions/libipt_ROUTE.c
--- netfilter.orig/userspace/extensions/libipt_ROUTE.c Thu Jun 13
18:12:01 2002
+++ netfilter/userspace/extensions/libipt_ROUTE.c Mon Jun 17 17:57:44
2002
@@ -21,7 +21,7 @@
" --iface name Send this packet directly through
iface name.\n"
" --ifindex index Send this packet directly through
iface index.\n"
"\n",
-NETFILTER_VERSION);
+IPTABLES_VERSION);
}

static struct option opts[] = {
@@ -57,7 +57,7 @@
exit_error(PARAMETER_PROBLEM,
"Can't specify --iface or --ifindex twice");

- if (check_inverse(optarg, &invert))
+ if (check_inverse(optarg, &invert, NULL, 0))
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --iface");

@@ -74,7 +74,7 @@
exit_error(PARAMETER_PROBLEM,
"Can't specify --iface or --ifindex twice");

- if (check_inverse(optarg, &invert))
+ if (check_inverse(optarg, &invert, NULL, 0))
exit_error(PARAMETER_PROBLEM,
"Unexpected `!' after --ifindex");

@@ -124,7 +124,7 @@
struct iptables_target route
= { NULL,

     "ROUTE",
-    NETFILTER_VERSION,
+    IPTABLES_VERSION,
     IPT_ALIGN(sizeof(struct ipt_route_target_info)),
     IPT_ALIGN(sizeof(struct ipt_route_target_info)),
     &help,
userspace/extensions/libipt_ROUTE.c +4 -4
diff -Nru netfilter.orig/userspace/extensions/libipt_ROUTE.c netfilter/userspace/extensions/libipt_ROUTE.c
@@ -21,7 +21,7 @@
 "  --iface   name                Send this packet directly through iface name.\n"
 "  --ifindex index               Send this packet directly through iface index.\n"
 "\n",
-NETFILTER_VERSION);
+IPTABLES_VERSION);
 }
 
 static struct option opts[] = {
@@ -57,7 +57,7 @@
 			exit_error(PARAMETER_PROBLEM,
 				   "Can't specify --iface or --ifindex twice");
 
-		if (check_inverse(optarg, &invert))
+		if (check_inverse(optarg, &invert, NULL, 0))
 			exit_error(PARAMETER_PROBLEM,
 				   "Unexpected `!' after --iface");
 
@@ -74,7 +74,7 @@
 			exit_error(PARAMETER_PROBLEM,
 				   "Can't specify --iface or --ifindex twice");
 
-		if (check_inverse(optarg, &invert))
+		if (check_inverse(optarg, &invert, NULL, 0))
 			exit_error(PARAMETER_PROBLEM,
 				   "Unexpected `!' after --ifindex");
 
@@ -124,7 +124,7 @@
 struct iptables_target route
 = { NULL,
     "ROUTE",
-    NETFILTER_VERSION,
+    IPTABLES_VERSION,
     IPT_ALIGN(sizeof(struct ipt_route_target_info)),
     IPT_ALIGN(sizeof(struct ipt_route_target_info)),
     &help,