mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Acked-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1bf06cd2e3
commit
6e23ae2a48
69 changed files with 321 additions and 302 deletions
|
|
@ -325,8 +325,8 @@ struct compat_ipt_replace {
|
|||
u32 valid_hooks;
|
||||
u32 num_entries;
|
||||
u32 size;
|
||||
u32 hook_entry[NF_IP_NUMHOOKS];
|
||||
u32 underflow[NF_IP_NUMHOOKS];
|
||||
u32 hook_entry[NF_INET_NUMHOOKS];
|
||||
u32 underflow[NF_INET_NUMHOOKS];
|
||||
u32 num_counters;
|
||||
compat_uptr_t counters; /* struct ipt_counters * */
|
||||
struct ipt_entry entries[0];
|
||||
|
|
@ -391,7 +391,7 @@ static int do_netfilter_replace(int fd, int level, int optname,
|
|||
origsize))
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < NF_IP_NUMHOOKS; i++) {
|
||||
for (i = 0; i < NF_INET_NUMHOOKS; i++) {
|
||||
if (__get_user(tmp32, &urepl->hook_entry[i]) ||
|
||||
__put_user(tmp32, &repl_nat->hook_entry[i]) ||
|
||||
__get_user(tmp32, &urepl->underflow[i]) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue