summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2004-02-11 22:03:12 +0000
committerBart De Schuymer <bdschuym@pandora.be>2004-02-11 22:03:12 +0000
commit203181714b4cd0301c75f950f3cc293a4e50589d (patch)
treee33f7255a34b996cf257abf182ae7fad6f09f328
parent5f036cb55a542ac01cbbd6ee76a623eb265ce243 (diff)
get rid of warning when arptables is compiled in a 2.4 kernel, thanks to Siva Kumar Natarajan for the report
-rw-r--r--arptables.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arptables.c b/arptables.c
index b10361f..b864900 100644
--- a/arptables.c
+++ b/arptables.c
@@ -1781,20 +1781,24 @@ int do_command(int argc, char *argv[], char **table, arptc_handle_t *handle)
/* first figure out if this is a 2.6 or a 2.4 kernel */
*handle = arptc_init(*table);
+ /* 2.4 kernel: NF_ARP_NUMHOOKS = 2 */
if (!*handle) {
- arptables_insmod("arp_tables", modprobe);
+ RUNTIME_NF_ARP_NUMHOOKS = 2;
*handle = arptc_init(*table);
if (!*handle) {
- /* 2.4 kernel: NF_ARP_NUMHOOKS = 2 */
- RUNTIME_NF_ARP_NUMHOOKS = 2;
+ arptables_insmod("arp_tables", modprobe);
+ RUNTIME_NF_ARP_NUMHOOKS = 3;
*handle = arptc_init(*table);
if (!*handle) {
- exit_error(VERSION_PROBLEM,
- "can't initialize arptables table `%s': %s",
- *table, arptc_strerror(errno));
+ RUNTIME_NF_ARP_NUMHOOKS = 2;
+ *handle = arptc_init(*table);
}
}
}
+ if (!*handle)
+ exit_error(VERSION_PROBLEM,
+ "can't initialize arptables table `%s': %s",
+ *table, arptc_strerror(errno));
memset(&fw, 0, sizeof(fw));
opts = original_opts;