Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: Pass nf_hook_state through arpt_do_table().

Signed-off-by: David S. Miller <davem@davemloft.net>

+7 -9
+1 -2
include/linux/netfilter_arp/arp_tables.h
··· 54 54 extern void arpt_unregister_table(struct xt_table *table); 55 55 extern unsigned int arpt_do_table(struct sk_buff *skb, 56 56 unsigned int hook, 57 - const struct net_device *in, 58 - const struct net_device *out, 57 + const struct nf_hook_state *state, 59 58 struct xt_table *table); 60 59 61 60 #ifdef CONFIG_COMPAT
+5 -6
net/ipv4/netfilter/arp_tables.c
··· 248 248 249 249 unsigned int arpt_do_table(struct sk_buff *skb, 250 250 unsigned int hook, 251 - const struct net_device *in, 252 - const struct net_device *out, 251 + const struct nf_hook_state *state, 253 252 struct xt_table *table) 254 253 { 255 254 static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long)))); ··· 264 265 if (!pskb_may_pull(skb, arp_hdr_len(skb->dev))) 265 266 return NF_DROP; 266 267 267 - indev = in ? in->name : nulldevname; 268 - outdev = out ? out->name : nulldevname; 268 + indev = state->in ? state->in->name : nulldevname; 269 + outdev = state->out ? state->out->name : nulldevname; 269 270 270 271 local_bh_disable(); 271 272 addend = xt_write_recseq_begin(); ··· 280 281 e = get_entry(table_base, private->hook_entry[hook]); 281 282 back = get_entry(table_base, private->underflow[hook]); 282 283 283 - acpar.in = in; 284 - acpar.out = out; 284 + acpar.in = state->in; 285 + acpar.out = state->out; 285 286 acpar.hooknum = hook; 286 287 acpar.family = NFPROTO_ARP; 287 288 acpar.hotdrop = false;
+1 -1
net/ipv4/netfilter/arptable_filter.c
··· 32 32 { 33 33 const struct net *net = dev_net(state->in ? state->in : state->out); 34 34 35 - return arpt_do_table(skb, ops->hooknum, state->in, state->out, 35 + return arpt_do_table(skb, ops->hooknum, state, 36 36 net->ipv4.arptable_filter); 37 37 } 38 38