diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2004-02-11 22:03:12 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2004-02-11 22:03:12 +0000 |
commit | 86424b1092214cac3bec97919c1236cb1e96853e (patch) | |
tree | 5498be24b25de07f4266900e231ade790c031a18 /userspace | |
parent | 01efa9dfb2c6b5cd178efedeb963f717d7ba2fd3 (diff) |
get rid of warning when arptables is compiled in a 2.4 kernel, thanks to Siva Kumar Natarajan for the report
Diffstat (limited to 'userspace')
-rw-r--r-- | userspace/arptables/arptables.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/userspace/arptables/arptables.c b/userspace/arptables/arptables.c index b10361f..b864900 100644 --- a/userspace/arptables/arptables.c +++ b/userspace/arptables/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; |