aboutsummaryrefslogtreecommitdiffstats
path: root/net/compat.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-19 21:53:30 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:55 -0500
commit6e23ae2a48750bda407a4a58f52a4865d7308bf5 (patch)
tree633fd60b2a42bf6fdb86564f0c05a6d52d8dc92b /net/compat.c
parent1bf06cd2e338fd6fc29169d30eaf0df982338285 (diff)
[NETFILTER]: Introduce NF_INET_ hook values
The IPv4 and IPv6 hook values are identical, yet some code tries to figure out the "correct" value by looking at the address family. Introduce NF_INET_* values for both IPv4 and IPv6. The old values are kept in a #ifndef __KERNEL__ section for userspace compatibility. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/compat.c')
-rw-r--r--net/compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/compat.c b/net/compat.c
index 377e560ab5c9..f4ef4c048652 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -325,8 +325,8 @@ struct compat_ipt_replace {
325 u32 valid_hooks; 325 u32 valid_hooks;
326 u32 num_entries; 326 u32 num_entries;
327 u32 size; 327 u32 size;
328 u32 hook_entry[NF_IP_NUMHOOKS]; 328 u32 hook_entry[NF_INET_NUMHOOKS];
329 u32 underflow[NF_IP_NUMHOOKS]; 329 u32 underflow[NF_INET_NUMHOOKS];
330 u32 num_counters; 330 u32 num_counters;
331 compat_uptr_t counters; /* struct ipt_counters * */ 331 compat_uptr_t counters; /* struct ipt_counters * */
332 struct ipt_entry entries[0]; 332 struct ipt_entry entries[0];
@@ -391,7 +391,7 @@ static int do_netfilter_replace(int fd, int level, int optname,
391 origsize)) 391 origsize))
392 goto out; 392 goto out;
393 393
394 for (i = 0; i < NF_IP_NUMHOOKS; i++) { 394 for (i = 0; i < NF_INET_NUMHOOKS; i++) {
395 if (__get_user(tmp32, &urepl->hook_entry[i]) || 395 if (__get_user(tmp32, &urepl->hook_entry[i]) ||
396 __put_user(tmp32, &repl_nat->hook_entry[i]) || 396 __put_user(tmp32, &repl_nat->hook_entry[i]) ||
397 __get_user(tmp32, &urepl->underflow[i]) || 397 __get_user(tmp32, &urepl->underflow[i]) ||