diff options
43 files changed, 156 insertions, 157 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 0b4d4560f33d..987c74cd523c 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -80,7 +80,7 @@ static inline void nf_hook_state_init(struct nf_hook_state *p, | |||
80 | p->okfn = okfn; | 80 | p->okfn = okfn; |
81 | } | 81 | } |
82 | 82 | ||
83 | typedef unsigned int nf_hookfn(const struct nf_hook_ops *ops, | 83 | typedef unsigned int nf_hookfn(void *priv, |
84 | struct sk_buff *skb, | 84 | struct sk_buff *skb, |
85 | const struct nf_hook_state *state); | 85 | const struct nf_hook_state *state); |
86 | 86 | ||
diff --git a/include/net/netfilter/br_netfilter.h b/include/net/netfilter/br_netfilter.h index 8fe266504900..c93c75fa41ad 100644 --- a/include/net/netfilter/br_netfilter.h +++ b/include/net/netfilter/br_netfilter.h | |||
@@ -46,7 +46,7 @@ void br_netfilter_enable(void); | |||
46 | 46 | ||
47 | #if IS_ENABLED(CONFIG_IPV6) | 47 | #if IS_ENABLED(CONFIG_IPV6) |
48 | int br_validate_ipv6(struct sk_buff *skb); | 48 | int br_validate_ipv6(struct sk_buff *skb); |
49 | unsigned int br_nf_pre_routing_ipv6(const struct nf_hook_ops *ops, | 49 | unsigned int br_nf_pre_routing_ipv6(void *priv, |
50 | struct sk_buff *skb, | 50 | struct sk_buff *skb, |
51 | const struct nf_hook_state *state); | 51 | const struct nf_hook_state *state); |
52 | #else | 52 | #else |
diff --git a/include/net/netfilter/nf_nat_l3proto.h b/include/net/netfilter/nf_nat_l3proto.h index a3127325f624..aef3e5fc9fd9 100644 --- a/include/net/netfilter/nf_nat_l3proto.h +++ b/include/net/netfilter/nf_nat_l3proto.h | |||
@@ -43,31 +43,31 @@ int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct, | |||
43 | enum ip_conntrack_info ctinfo, | 43 | enum ip_conntrack_info ctinfo, |
44 | unsigned int hooknum); | 44 | unsigned int hooknum); |
45 | 45 | ||
46 | unsigned int nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | 46 | unsigned int nf_nat_ipv4_in(void *priv, struct sk_buff *skb, |
47 | const struct nf_hook_state *state, | 47 | const struct nf_hook_state *state, |
48 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 48 | unsigned int (*do_chain)(void *priv, |
49 | struct sk_buff *skb, | 49 | struct sk_buff *skb, |
50 | const struct nf_hook_state *state, | 50 | const struct nf_hook_state *state, |
51 | struct nf_conn *ct)); | 51 | struct nf_conn *ct)); |
52 | 52 | ||
53 | unsigned int nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | 53 | unsigned int nf_nat_ipv4_out(void *priv, struct sk_buff *skb, |
54 | const struct nf_hook_state *state, | 54 | const struct nf_hook_state *state, |
55 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 55 | unsigned int (*do_chain)(void *priv, |
56 | struct sk_buff *skb, | 56 | struct sk_buff *skb, |
57 | const struct nf_hook_state *state, | 57 | const struct nf_hook_state *state, |
58 | struct nf_conn *ct)); | 58 | struct nf_conn *ct)); |
59 | 59 | ||
60 | unsigned int nf_nat_ipv4_local_fn(const struct nf_hook_ops *ops, | 60 | unsigned int nf_nat_ipv4_local_fn(void *priv, |
61 | struct sk_buff *skb, | 61 | struct sk_buff *skb, |
62 | const struct nf_hook_state *state, | 62 | const struct nf_hook_state *state, |
63 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 63 | unsigned int (*do_chain)(void *priv, |
64 | struct sk_buff *skb, | 64 | struct sk_buff *skb, |
65 | const struct nf_hook_state *state, | 65 | const struct nf_hook_state *state, |
66 | struct nf_conn *ct)); | 66 | struct nf_conn *ct)); |
67 | 67 | ||
68 | unsigned int nf_nat_ipv4_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 68 | unsigned int nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, |
69 | const struct nf_hook_state *state, | 69 | const struct nf_hook_state *state, |
70 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 70 | unsigned int (*do_chain)(void *priv, |
71 | struct sk_buff *skb, | 71 | struct sk_buff *skb, |
72 | const struct nf_hook_state *state, | 72 | const struct nf_hook_state *state, |
73 | struct nf_conn *ct)); | 73 | struct nf_conn *ct)); |
@@ -76,31 +76,31 @@ int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct, | |||
76 | enum ip_conntrack_info ctinfo, | 76 | enum ip_conntrack_info ctinfo, |
77 | unsigned int hooknum, unsigned int hdrlen); | 77 | unsigned int hooknum, unsigned int hdrlen); |
78 | 78 | ||
79 | unsigned int nf_nat_ipv6_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | 79 | unsigned int nf_nat_ipv6_in(void *priv, struct sk_buff *skb, |
80 | const struct nf_hook_state *state, | 80 | const struct nf_hook_state *state, |
81 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 81 | unsigned int (*do_chain)(void *priv, |
82 | struct sk_buff *skb, | 82 | struct sk_buff *skb, |
83 | const struct nf_hook_state *state, | 83 | const struct nf_hook_state *state, |
84 | struct nf_conn *ct)); | 84 | struct nf_conn *ct)); |
85 | 85 | ||
86 | unsigned int nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | 86 | unsigned int nf_nat_ipv6_out(void *priv, struct sk_buff *skb, |
87 | const struct nf_hook_state *state, | 87 | const struct nf_hook_state *state, |
88 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 88 | unsigned int (*do_chain)(void *priv, |
89 | struct sk_buff *skb, | 89 | struct sk_buff *skb, |
90 | const struct nf_hook_state *state, | 90 | const struct nf_hook_state *state, |
91 | struct nf_conn *ct)); | 91 | struct nf_conn *ct)); |
92 | 92 | ||
93 | unsigned int nf_nat_ipv6_local_fn(const struct nf_hook_ops *ops, | 93 | unsigned int nf_nat_ipv6_local_fn(void *priv, |
94 | struct sk_buff *skb, | 94 | struct sk_buff *skb, |
95 | const struct nf_hook_state *state, | 95 | const struct nf_hook_state *state, |
96 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 96 | unsigned int (*do_chain)(void *priv, |
97 | struct sk_buff *skb, | 97 | struct sk_buff *skb, |
98 | const struct nf_hook_state *state, | 98 | const struct nf_hook_state *state, |
99 | struct nf_conn *ct)); | 99 | struct nf_conn *ct)); |
100 | 100 | ||
101 | unsigned int nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 101 | unsigned int nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, |
102 | const struct nf_hook_state *state, | 102 | const struct nf_hook_state *state, |
103 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 103 | unsigned int (*do_chain)(void *priv, |
104 | struct sk_buff *skb, | 104 | struct sk_buff *skb, |
105 | const struct nf_hook_state *state, | 105 | const struct nf_hook_state *state, |
106 | struct nf_conn *ct)); | 106 | struct nf_conn *ct)); |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 42e239e55aa3..c9149cc0a02d 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
@@ -816,8 +816,7 @@ int nft_register_basechain(struct nft_base_chain *basechain, | |||
816 | void nft_unregister_basechain(struct nft_base_chain *basechain, | 816 | void nft_unregister_basechain(struct nft_base_chain *basechain, |
817 | unsigned int hook_nops); | 817 | unsigned int hook_nops); |
818 | 818 | ||
819 | unsigned int nft_do_chain(struct nft_pktinfo *pkt, | 819 | unsigned int nft_do_chain(struct nft_pktinfo *pkt, void *priv); |
820 | const struct nf_hook_ops *ops); | ||
821 | 820 | ||
822 | /** | 821 | /** |
823 | * struct nft_table - nf_tables table | 822 | * struct nft_table - nf_tables table |
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index e6e76bbdc82f..e21e44c13e07 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c | |||
@@ -464,7 +464,7 @@ struct net_device *setup_pre_routing(struct sk_buff *skb) | |||
464 | * receiving device) to make netfilter happy, the REDIRECT | 464 | * receiving device) to make netfilter happy, the REDIRECT |
465 | * target in particular. Save the original destination IP | 465 | * target in particular. Save the original destination IP |
466 | * address to be able to detect DNAT afterwards. */ | 466 | * address to be able to detect DNAT afterwards. */ |
467 | static unsigned int br_nf_pre_routing(const struct nf_hook_ops *ops, | 467 | static unsigned int br_nf_pre_routing(void *priv, |
468 | struct sk_buff *skb, | 468 | struct sk_buff *skb, |
469 | const struct nf_hook_state *state) | 469 | const struct nf_hook_state *state) |
470 | { | 470 | { |
@@ -486,7 +486,7 @@ static unsigned int br_nf_pre_routing(const struct nf_hook_ops *ops, | |||
486 | return NF_ACCEPT; | 486 | return NF_ACCEPT; |
487 | 487 | ||
488 | nf_bridge_pull_encap_header_rcsum(skb); | 488 | nf_bridge_pull_encap_header_rcsum(skb); |
489 | return br_nf_pre_routing_ipv6(ops, skb, state); | 489 | return br_nf_pre_routing_ipv6(priv, skb, state); |
490 | } | 490 | } |
491 | 491 | ||
492 | if (!brnf_call_iptables && !br->nf_call_iptables) | 492 | if (!brnf_call_iptables && !br->nf_call_iptables) |
@@ -526,7 +526,7 @@ static unsigned int br_nf_pre_routing(const struct nf_hook_ops *ops, | |||
526 | * took place when the packet entered the bridge), but we | 526 | * took place when the packet entered the bridge), but we |
527 | * register an IPv4 PRE_ROUTING 'sabotage' hook that will | 527 | * register an IPv4 PRE_ROUTING 'sabotage' hook that will |
528 | * prevent this from happening. */ | 528 | * prevent this from happening. */ |
529 | static unsigned int br_nf_local_in(const struct nf_hook_ops *ops, | 529 | static unsigned int br_nf_local_in(void *priv, |
530 | struct sk_buff *skb, | 530 | struct sk_buff *skb, |
531 | const struct nf_hook_state *state) | 531 | const struct nf_hook_state *state) |
532 | { | 532 | { |
@@ -570,7 +570,7 @@ static int br_nf_forward_finish(struct net *net, struct sock *sk, struct sk_buff | |||
570 | * but we are still able to filter on the 'real' indev/outdev | 570 | * but we are still able to filter on the 'real' indev/outdev |
571 | * because of the physdev module. For ARP, indev and outdev are the | 571 | * because of the physdev module. For ARP, indev and outdev are the |
572 | * bridge ports. */ | 572 | * bridge ports. */ |
573 | static unsigned int br_nf_forward_ip(const struct nf_hook_ops *ops, | 573 | static unsigned int br_nf_forward_ip(void *priv, |
574 | struct sk_buff *skb, | 574 | struct sk_buff *skb, |
575 | const struct nf_hook_state *state) | 575 | const struct nf_hook_state *state) |
576 | { | 576 | { |
@@ -633,7 +633,7 @@ static unsigned int br_nf_forward_ip(const struct nf_hook_ops *ops, | |||
633 | return NF_STOLEN; | 633 | return NF_STOLEN; |
634 | } | 634 | } |
635 | 635 | ||
636 | static unsigned int br_nf_forward_arp(const struct nf_hook_ops *ops, | 636 | static unsigned int br_nf_forward_arp(void *priv, |
637 | struct sk_buff *skb, | 637 | struct sk_buff *skb, |
638 | const struct nf_hook_state *state) | 638 | const struct nf_hook_state *state) |
639 | { | 639 | { |
@@ -801,7 +801,7 @@ static int br_nf_dev_queue_xmit(struct net *net, struct sock *sk, struct sk_buff | |||
801 | } | 801 | } |
802 | 802 | ||
803 | /* PF_BRIDGE/POST_ROUTING ********************************************/ | 803 | /* PF_BRIDGE/POST_ROUTING ********************************************/ |
804 | static unsigned int br_nf_post_routing(const struct nf_hook_ops *ops, | 804 | static unsigned int br_nf_post_routing(void *priv, |
805 | struct sk_buff *skb, | 805 | struct sk_buff *skb, |
806 | const struct nf_hook_state *state) | 806 | const struct nf_hook_state *state) |
807 | { | 807 | { |
@@ -850,7 +850,7 @@ static unsigned int br_nf_post_routing(const struct nf_hook_ops *ops, | |||
850 | /* IP/SABOTAGE *****************************************************/ | 850 | /* IP/SABOTAGE *****************************************************/ |
851 | /* Don't hand locally destined packets to PF_INET(6)/PRE_ROUTING | 851 | /* Don't hand locally destined packets to PF_INET(6)/PRE_ROUTING |
852 | * for the second time. */ | 852 | * for the second time. */ |
853 | static unsigned int ip_sabotage_in(const struct nf_hook_ops *ops, | 853 | static unsigned int ip_sabotage_in(void *priv, |
854 | struct sk_buff *skb, | 854 | struct sk_buff *skb, |
855 | const struct nf_hook_state *state) | 855 | const struct nf_hook_state *state) |
856 | { | 856 | { |
diff --git a/net/bridge/br_netfilter_ipv6.c b/net/bridge/br_netfilter_ipv6.c index e4dbbe44c724..c51cc3fd50d9 100644 --- a/net/bridge/br_netfilter_ipv6.c +++ b/net/bridge/br_netfilter_ipv6.c | |||
@@ -218,7 +218,7 @@ static int br_nf_pre_routing_finish_ipv6(struct net *net, struct sock *sk, struc | |||
218 | /* Replicate the checks that IPv6 does on packet reception and pass the packet | 218 | /* Replicate the checks that IPv6 does on packet reception and pass the packet |
219 | * to ip6tables. | 219 | * to ip6tables. |
220 | */ | 220 | */ |
221 | unsigned int br_nf_pre_routing_ipv6(const struct nf_hook_ops *ops, | 221 | unsigned int br_nf_pre_routing_ipv6(void *priv, |
222 | struct sk_buff *skb, | 222 | struct sk_buff *skb, |
223 | const struct nf_hook_state *state) | 223 | const struct nf_hook_state *state) |
224 | { | 224 | { |
diff --git a/net/bridge/netfilter/ebtable_filter.c b/net/bridge/netfilter/ebtable_filter.c index 118ce40ac181..f9242dffa65e 100644 --- a/net/bridge/netfilter/ebtable_filter.c +++ b/net/bridge/netfilter/ebtable_filter.c | |||
@@ -57,14 +57,14 @@ static const struct ebt_table frame_filter = { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | static unsigned int | 59 | static unsigned int |
60 | ebt_in_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 60 | ebt_in_hook(void *priv, struct sk_buff *skb, |
61 | const struct nf_hook_state *state) | 61 | const struct nf_hook_state *state) |
62 | { | 62 | { |
63 | return ebt_do_table(skb, state, state->net->xt.frame_filter); | 63 | return ebt_do_table(skb, state, state->net->xt.frame_filter); |
64 | } | 64 | } |
65 | 65 | ||
66 | static unsigned int | 66 | static unsigned int |
67 | ebt_out_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 67 | ebt_out_hook(void *priv, struct sk_buff *skb, |
68 | const struct nf_hook_state *state) | 68 | const struct nf_hook_state *state) |
69 | { | 69 | { |
70 | return ebt_do_table(skb, state, state->net->xt.frame_filter); | 70 | return ebt_do_table(skb, state, state->net->xt.frame_filter); |
diff --git a/net/bridge/netfilter/ebtable_nat.c b/net/bridge/netfilter/ebtable_nat.c index 56c3329d6c37..4bbefe03ab58 100644 --- a/net/bridge/netfilter/ebtable_nat.c +++ b/net/bridge/netfilter/ebtable_nat.c | |||
@@ -57,14 +57,14 @@ static struct ebt_table frame_nat = { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | static unsigned int | 59 | static unsigned int |
60 | ebt_nat_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | 60 | ebt_nat_in(void *priv, struct sk_buff *skb, |
61 | const struct nf_hook_state *state) | 61 | const struct nf_hook_state *state) |
62 | { | 62 | { |
63 | return ebt_do_table(skb, state, state->net->xt.frame_nat); | 63 | return ebt_do_table(skb, state, state->net->xt.frame_nat); |
64 | } | 64 | } |
65 | 65 | ||
66 | static unsigned int | 66 | static unsigned int |
67 | ebt_nat_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | 67 | ebt_nat_out(void *priv, struct sk_buff *skb, |
68 | const struct nf_hook_state *state) | 68 | const struct nf_hook_state *state) |
69 | { | 69 | { |
70 | return ebt_do_table(skb, state, state->net->xt.frame_nat); | 70 | return ebt_do_table(skb, state, state->net->xt.frame_nat); |
diff --git a/net/bridge/netfilter/nf_tables_bridge.c b/net/bridge/netfilter/nf_tables_bridge.c index 318d825e4207..62f6b1b19589 100644 --- a/net/bridge/netfilter/nf_tables_bridge.c +++ b/net/bridge/netfilter/nf_tables_bridge.c | |||
@@ -87,7 +87,7 @@ static inline void nft_bridge_set_pktinfo_ipv6(struct nft_pktinfo *pkt, | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static unsigned int | 89 | static unsigned int |
90 | nft_do_chain_bridge(const struct nf_hook_ops *ops, | 90 | nft_do_chain_bridge(void *priv, |
91 | struct sk_buff *skb, | 91 | struct sk_buff *skb, |
92 | const struct nf_hook_state *state) | 92 | const struct nf_hook_state *state) |
93 | { | 93 | { |
@@ -105,7 +105,7 @@ nft_do_chain_bridge(const struct nf_hook_ops *ops, | |||
105 | break; | 105 | break; |
106 | } | 106 | } |
107 | 107 | ||
108 | return nft_do_chain(&pkt, ops); | 108 | return nft_do_chain(&pkt, priv); |
109 | } | 109 | } |
110 | 110 | ||
111 | static struct nft_af_info nft_af_bridge __read_mostly = { | 111 | static struct nft_af_info nft_af_bridge __read_mostly = { |
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index af34fc9bdf69..85f2fdc360c2 100644 --- a/net/decnet/netfilter/dn_rtmsg.c +++ b/net/decnet/netfilter/dn_rtmsg.c | |||
@@ -87,7 +87,7 @@ static void dnrmg_send_peer(struct sk_buff *skb) | |||
87 | } | 87 | } |
88 | 88 | ||
89 | 89 | ||
90 | static unsigned int dnrmg_hook(const struct nf_hook_ops *ops, | 90 | static unsigned int dnrmg_hook(void *priv, |
91 | struct sk_buff *skb, | 91 | struct sk_buff *skb, |
92 | const struct nf_hook_state *state) | 92 | const struct nf_hook_state *state) |
93 | { | 93 | { |
diff --git a/net/ipv4/netfilter/arptable_filter.c b/net/ipv4/netfilter/arptable_filter.c index 1352e12d4068..1897ee160920 100644 --- a/net/ipv4/netfilter/arptable_filter.c +++ b/net/ipv4/netfilter/arptable_filter.c | |||
@@ -27,7 +27,7 @@ static const struct xt_table packet_filter = { | |||
27 | 27 | ||
28 | /* The work comes in here from netfilter.c */ | 28 | /* The work comes in here from netfilter.c */ |
29 | static unsigned int | 29 | static unsigned int |
30 | arptable_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 30 | arptable_filter_hook(void *priv, struct sk_buff *skb, |
31 | const struct nf_hook_state *state) | 31 | const struct nf_hook_state *state) |
32 | { | 32 | { |
33 | return arpt_do_table(skb, state, state->net->ipv4.arptable_filter); | 33 | return arpt_do_table(skb, state, state->net->ipv4.arptable_filter); |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 69157d8eba95..3f32c03e8b2e 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -507,7 +507,7 @@ static void arp_print(struct arp_payload *payload) | |||
507 | #endif | 507 | #endif |
508 | 508 | ||
509 | static unsigned int | 509 | static unsigned int |
510 | arp_mangle(const struct nf_hook_ops *ops, | 510 | arp_mangle(void *priv, |
511 | struct sk_buff *skb, | 511 | struct sk_buff *skb, |
512 | const struct nf_hook_state *state) | 512 | const struct nf_hook_state *state) |
513 | { | 513 | { |
diff --git a/net/ipv4/netfilter/ipt_SYNPROXY.c b/net/ipv4/netfilter/ipt_SYNPROXY.c index dfab314981e9..d7021f28c3f0 100644 --- a/net/ipv4/netfilter/ipt_SYNPROXY.c +++ b/net/ipv4/netfilter/ipt_SYNPROXY.c | |||
@@ -299,7 +299,7 @@ synproxy_tg4(struct sk_buff *skb, const struct xt_action_param *par) | |||
299 | return XT_CONTINUE; | 299 | return XT_CONTINUE; |
300 | } | 300 | } |
301 | 301 | ||
302 | static unsigned int ipv4_synproxy_hook(const struct nf_hook_ops *ops, | 302 | static unsigned int ipv4_synproxy_hook(void *priv, |
303 | struct sk_buff *skb, | 303 | struct sk_buff *skb, |
304 | const struct nf_hook_state *nhs) | 304 | const struct nf_hook_state *nhs) |
305 | { | 305 | { |
diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c index 02d4c5395d6e..397ef2dd133e 100644 --- a/net/ipv4/netfilter/iptable_filter.c +++ b/net/ipv4/netfilter/iptable_filter.c | |||
@@ -33,7 +33,7 @@ static const struct xt_table packet_filter = { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | static unsigned int | 35 | static unsigned int |
36 | iptable_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 36 | iptable_filter_hook(void *priv, struct sk_buff *skb, |
37 | const struct nf_hook_state *state) | 37 | const struct nf_hook_state *state) |
38 | { | 38 | { |
39 | if (state->hook == NF_INET_LOCAL_OUT && | 39 | if (state->hook == NF_INET_LOCAL_OUT && |
diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c index dc2ff6884999..2d6fc911866f 100644 --- a/net/ipv4/netfilter/iptable_mangle.c +++ b/net/ipv4/netfilter/iptable_mangle.c | |||
@@ -78,7 +78,7 @@ ipt_mangle_out(struct sk_buff *skb, const struct nf_hook_state *state) | |||
78 | 78 | ||
79 | /* The work comes in here from netfilter.c. */ | 79 | /* The work comes in here from netfilter.c. */ |
80 | static unsigned int | 80 | static unsigned int |
81 | iptable_mangle_hook(const struct nf_hook_ops *ops, | 81 | iptable_mangle_hook(void *priv, |
82 | struct sk_buff *skb, | 82 | struct sk_buff *skb, |
83 | const struct nf_hook_state *state) | 83 | const struct nf_hook_state *state) |
84 | { | 84 | { |
diff --git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c index 8ff63ac1f0d6..3a2e4d830a0b 100644 --- a/net/ipv4/netfilter/iptable_nat.c +++ b/net/ipv4/netfilter/iptable_nat.c | |||
@@ -28,7 +28,7 @@ static const struct xt_table nf_nat_ipv4_table = { | |||
28 | .af = NFPROTO_IPV4, | 28 | .af = NFPROTO_IPV4, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static unsigned int iptable_nat_do_chain(const struct nf_hook_ops *ops, | 31 | static unsigned int iptable_nat_do_chain(void *priv, |
32 | struct sk_buff *skb, | 32 | struct sk_buff *skb, |
33 | const struct nf_hook_state *state, | 33 | const struct nf_hook_state *state, |
34 | struct nf_conn *ct) | 34 | struct nf_conn *ct) |
@@ -36,32 +36,32 @@ static unsigned int iptable_nat_do_chain(const struct nf_hook_ops *ops, | |||
36 | return ipt_do_table(skb, state, state->net->ipv4.nat_table); | 36 | return ipt_do_table(skb, state, state->net->ipv4.nat_table); |
37 | } | 37 | } |
38 | 38 | ||
39 | static unsigned int iptable_nat_ipv4_fn(const struct nf_hook_ops *ops, | 39 | static unsigned int iptable_nat_ipv4_fn(void *priv, |
40 | struct sk_buff *skb, | 40 | struct sk_buff *skb, |
41 | const struct nf_hook_state *state) | 41 | const struct nf_hook_state *state) |
42 | { | 42 | { |
43 | return nf_nat_ipv4_fn(ops, skb, state, iptable_nat_do_chain); | 43 | return nf_nat_ipv4_fn(priv, skb, state, iptable_nat_do_chain); |
44 | } | 44 | } |
45 | 45 | ||
46 | static unsigned int iptable_nat_ipv4_in(const struct nf_hook_ops *ops, | 46 | static unsigned int iptable_nat_ipv4_in(void *priv, |
47 | struct sk_buff *skb, | 47 | struct sk_buff *skb, |
48 | const struct nf_hook_state *state) | 48 | const struct nf_hook_state *state) |
49 | { | 49 | { |
50 | return nf_nat_ipv4_in(ops, skb, state, iptable_nat_do_chain); | 50 | return nf_nat_ipv4_in(priv, skb, state, iptable_nat_do_chain); |
51 | } | 51 | } |
52 | 52 | ||
53 | static unsigned int iptable_nat_ipv4_out(const struct nf_hook_ops *ops, | 53 | static unsigned int iptable_nat_ipv4_out(void *priv, |
54 | struct sk_buff *skb, | 54 | struct sk_buff *skb, |
55 | const struct nf_hook_state *state) | 55 | const struct nf_hook_state *state) |
56 | { | 56 | { |
57 | return nf_nat_ipv4_out(ops, skb, state, iptable_nat_do_chain); | 57 | return nf_nat_ipv4_out(priv, skb, state, iptable_nat_do_chain); |
58 | } | 58 | } |
59 | 59 | ||
60 | static unsigned int iptable_nat_ipv4_local_fn(const struct nf_hook_ops *ops, | 60 | static unsigned int iptable_nat_ipv4_local_fn(void *priv, |
61 | struct sk_buff *skb, | 61 | struct sk_buff *skb, |
62 | const struct nf_hook_state *state) | 62 | const struct nf_hook_state *state) |
63 | { | 63 | { |
64 | return nf_nat_ipv4_local_fn(ops, skb, state, iptable_nat_do_chain); | 64 | return nf_nat_ipv4_local_fn(priv, skb, state, iptable_nat_do_chain); |
65 | } | 65 | } |
66 | 66 | ||
67 | static struct nf_hook_ops nf_nat_ipv4_ops[] __read_mostly = { | 67 | static struct nf_hook_ops nf_nat_ipv4_ops[] __read_mostly = { |
diff --git a/net/ipv4/netfilter/iptable_raw.c b/net/ipv4/netfilter/iptable_raw.c index bbb0523d87de..1ba02811acb0 100644 --- a/net/ipv4/netfilter/iptable_raw.c +++ b/net/ipv4/netfilter/iptable_raw.c | |||
@@ -20,7 +20,7 @@ static const struct xt_table packet_raw = { | |||
20 | 20 | ||
21 | /* The work comes in here from netfilter.c. */ | 21 | /* The work comes in here from netfilter.c. */ |
22 | static unsigned int | 22 | static unsigned int |
23 | iptable_raw_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 23 | iptable_raw_hook(void *priv, struct sk_buff *skb, |
24 | const struct nf_hook_state *state) | 24 | const struct nf_hook_state *state) |
25 | { | 25 | { |
26 | if (state->hook == NF_INET_LOCAL_OUT && | 26 | if (state->hook == NF_INET_LOCAL_OUT && |
diff --git a/net/ipv4/netfilter/iptable_security.c b/net/ipv4/netfilter/iptable_security.c index b92417038705..f534e2f05bad 100644 --- a/net/ipv4/netfilter/iptable_security.c +++ b/net/ipv4/netfilter/iptable_security.c | |||
@@ -37,7 +37,7 @@ static const struct xt_table security_table = { | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | static unsigned int | 39 | static unsigned int |
40 | iptable_security_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 40 | iptable_security_hook(void *priv, struct sk_buff *skb, |
41 | const struct nf_hook_state *state) | 41 | const struct nf_hook_state *state) |
42 | { | 42 | { |
43 | if (state->hook == NF_INET_LOCAL_OUT && | 43 | if (state->hook == NF_INET_LOCAL_OUT && |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 15749cc5cf2b..752fb40adcf8 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -92,7 +92,7 @@ static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | |||
92 | return NF_ACCEPT; | 92 | return NF_ACCEPT; |
93 | } | 93 | } |
94 | 94 | ||
95 | static unsigned int ipv4_helper(const struct nf_hook_ops *ops, | 95 | static unsigned int ipv4_helper(void *priv, |
96 | struct sk_buff *skb, | 96 | struct sk_buff *skb, |
97 | const struct nf_hook_state *state) | 97 | const struct nf_hook_state *state) |
98 | { | 98 | { |
@@ -119,7 +119,7 @@ static unsigned int ipv4_helper(const struct nf_hook_ops *ops, | |||
119 | ct, ctinfo); | 119 | ct, ctinfo); |
120 | } | 120 | } |
121 | 121 | ||
122 | static unsigned int ipv4_confirm(const struct nf_hook_ops *ops, | 122 | static unsigned int ipv4_confirm(void *priv, |
123 | struct sk_buff *skb, | 123 | struct sk_buff *skb, |
124 | const struct nf_hook_state *state) | 124 | const struct nf_hook_state *state) |
125 | { | 125 | { |
@@ -143,14 +143,14 @@ out: | |||
143 | return nf_conntrack_confirm(skb); | 143 | return nf_conntrack_confirm(skb); |
144 | } | 144 | } |
145 | 145 | ||
146 | static unsigned int ipv4_conntrack_in(const struct nf_hook_ops *ops, | 146 | static unsigned int ipv4_conntrack_in(void *priv, |
147 | struct sk_buff *skb, | 147 | struct sk_buff *skb, |
148 | const struct nf_hook_state *state) | 148 | const struct nf_hook_state *state) |
149 | { | 149 | { |
150 | return nf_conntrack_in(state->net, PF_INET, state->hook, skb); | 150 | return nf_conntrack_in(state->net, PF_INET, state->hook, skb); |
151 | } | 151 | } |
152 | 152 | ||
153 | static unsigned int ipv4_conntrack_local(const struct nf_hook_ops *ops, | 153 | static unsigned int ipv4_conntrack_local(void *priv, |
154 | struct sk_buff *skb, | 154 | struct sk_buff *skb, |
155 | const struct nf_hook_state *state) | 155 | const struct nf_hook_state *state) |
156 | { | 156 | { |
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c index 8aea536d2e83..b246346ee849 100644 --- a/net/ipv4/netfilter/nf_defrag_ipv4.c +++ b/net/ipv4/netfilter/nf_defrag_ipv4.c | |||
@@ -61,7 +61,7 @@ static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum, | |||
61 | return IP_DEFRAG_CONNTRACK_OUT + zone_id; | 61 | return IP_DEFRAG_CONNTRACK_OUT + zone_id; |
62 | } | 62 | } |
63 | 63 | ||
64 | static unsigned int ipv4_conntrack_defrag(const struct nf_hook_ops *ops, | 64 | static unsigned int ipv4_conntrack_defrag(void *priv, |
65 | struct sk_buff *skb, | 65 | struct sk_buff *skb, |
66 | const struct nf_hook_state *state) | 66 | const struct nf_hook_state *state) |
67 | { | 67 | { |
diff --git a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c index 16da45a76dac..8593a9d88619 100644 --- a/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | |||
@@ -255,9 +255,9 @@ int nf_nat_icmp_reply_translation(struct sk_buff *skb, | |||
255 | EXPORT_SYMBOL_GPL(nf_nat_icmp_reply_translation); | 255 | EXPORT_SYMBOL_GPL(nf_nat_icmp_reply_translation); |
256 | 256 | ||
257 | unsigned int | 257 | unsigned int |
258 | nf_nat_ipv4_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 258 | nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, |
259 | const struct nf_hook_state *state, | 259 | const struct nf_hook_state *state, |
260 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 260 | unsigned int (*do_chain)(void *priv, |
261 | struct sk_buff *skb, | 261 | struct sk_buff *skb, |
262 | const struct nf_hook_state *state, | 262 | const struct nf_hook_state *state, |
263 | struct nf_conn *ct)) | 263 | struct nf_conn *ct)) |
@@ -308,7 +308,7 @@ nf_nat_ipv4_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
308 | if (!nf_nat_initialized(ct, maniptype)) { | 308 | if (!nf_nat_initialized(ct, maniptype)) { |
309 | unsigned int ret; | 309 | unsigned int ret; |
310 | 310 | ||
311 | ret = do_chain(ops, skb, state, ct); | 311 | ret = do_chain(priv, skb, state, ct); |
312 | if (ret != NF_ACCEPT) | 312 | if (ret != NF_ACCEPT) |
313 | return ret; | 313 | return ret; |
314 | 314 | ||
@@ -345,9 +345,9 @@ oif_changed: | |||
345 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_fn); | 345 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_fn); |
346 | 346 | ||
347 | unsigned int | 347 | unsigned int |
348 | nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | 348 | nf_nat_ipv4_in(void *priv, struct sk_buff *skb, |
349 | const struct nf_hook_state *state, | 349 | const struct nf_hook_state *state, |
350 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 350 | unsigned int (*do_chain)(void *priv, |
351 | struct sk_buff *skb, | 351 | struct sk_buff *skb, |
352 | const struct nf_hook_state *state, | 352 | const struct nf_hook_state *state, |
353 | struct nf_conn *ct)) | 353 | struct nf_conn *ct)) |
@@ -355,7 +355,7 @@ nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
355 | unsigned int ret; | 355 | unsigned int ret; |
356 | __be32 daddr = ip_hdr(skb)->daddr; | 356 | __be32 daddr = ip_hdr(skb)->daddr; |
357 | 357 | ||
358 | ret = nf_nat_ipv4_fn(ops, skb, state, do_chain); | 358 | ret = nf_nat_ipv4_fn(priv, skb, state, do_chain); |
359 | if (ret != NF_DROP && ret != NF_STOLEN && | 359 | if (ret != NF_DROP && ret != NF_STOLEN && |
360 | daddr != ip_hdr(skb)->daddr) | 360 | daddr != ip_hdr(skb)->daddr) |
361 | skb_dst_drop(skb); | 361 | skb_dst_drop(skb); |
@@ -365,9 +365,9 @@ nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
365 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_in); | 365 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_in); |
366 | 366 | ||
367 | unsigned int | 367 | unsigned int |
368 | nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | 368 | nf_nat_ipv4_out(void *priv, struct sk_buff *skb, |
369 | const struct nf_hook_state *state, | 369 | const struct nf_hook_state *state, |
370 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 370 | unsigned int (*do_chain)(void *priv, |
371 | struct sk_buff *skb, | 371 | struct sk_buff *skb, |
372 | const struct nf_hook_state *state, | 372 | const struct nf_hook_state *state, |
373 | struct nf_conn *ct)) | 373 | struct nf_conn *ct)) |
@@ -384,7 +384,7 @@ nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
384 | ip_hdrlen(skb) < sizeof(struct iphdr)) | 384 | ip_hdrlen(skb) < sizeof(struct iphdr)) |
385 | return NF_ACCEPT; | 385 | return NF_ACCEPT; |
386 | 386 | ||
387 | ret = nf_nat_ipv4_fn(ops, skb, state, do_chain); | 387 | ret = nf_nat_ipv4_fn(priv, skb, state, do_chain); |
388 | #ifdef CONFIG_XFRM | 388 | #ifdef CONFIG_XFRM |
389 | if (ret != NF_DROP && ret != NF_STOLEN && | 389 | if (ret != NF_DROP && ret != NF_STOLEN && |
390 | !(IPCB(skb)->flags & IPSKB_XFRM_TRANSFORMED) && | 390 | !(IPCB(skb)->flags & IPSKB_XFRM_TRANSFORMED) && |
@@ -407,9 +407,9 @@ nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
407 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_out); | 407 | EXPORT_SYMBOL_GPL(nf_nat_ipv4_out); |
408 | 408 | ||
409 | unsigned int | 409 | unsigned int |
410 | nf_nat_ipv4_local_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 410 | nf_nat_ipv4_local_fn(void *priv, struct sk_buff *skb, |
411 | const struct nf_hook_state *state, | 411 | const struct nf_hook_state *state, |
412 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 412 | unsigned int (*do_chain)(void *priv, |
413 | struct sk_buff *skb, | 413 | struct sk_buff *skb, |
414 | const struct nf_hook_state *state, | 414 | const struct nf_hook_state *state, |
415 | struct nf_conn *ct)) | 415 | struct nf_conn *ct)) |
@@ -424,7 +424,7 @@ nf_nat_ipv4_local_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
424 | ip_hdrlen(skb) < sizeof(struct iphdr)) | 424 | ip_hdrlen(skb) < sizeof(struct iphdr)) |
425 | return NF_ACCEPT; | 425 | return NF_ACCEPT; |
426 | 426 | ||
427 | ret = nf_nat_ipv4_fn(ops, skb, state, do_chain); | 427 | ret = nf_nat_ipv4_fn(priv, skb, state, do_chain); |
428 | if (ret != NF_DROP && ret != NF_STOLEN && | 428 | if (ret != NF_DROP && ret != NF_STOLEN && |
429 | (ct = nf_ct_get(skb, &ctinfo)) != NULL) { | 429 | (ct = nf_ct_get(skb, &ctinfo)) != NULL) { |
430 | enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); | 430 | enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); |
diff --git a/net/ipv4/netfilter/nf_tables_arp.c b/net/ipv4/netfilter/nf_tables_arp.c index 883bbf83fe09..9d09d4f59545 100644 --- a/net/ipv4/netfilter/nf_tables_arp.c +++ b/net/ipv4/netfilter/nf_tables_arp.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <net/netfilter/nf_tables.h> | 15 | #include <net/netfilter/nf_tables.h> |
16 | 16 | ||
17 | static unsigned int | 17 | static unsigned int |
18 | nft_do_chain_arp(const struct nf_hook_ops *ops, | 18 | nft_do_chain_arp(void *priv, |
19 | struct sk_buff *skb, | 19 | struct sk_buff *skb, |
20 | const struct nf_hook_state *state) | 20 | const struct nf_hook_state *state) |
21 | { | 21 | { |
@@ -23,7 +23,7 @@ nft_do_chain_arp(const struct nf_hook_ops *ops, | |||
23 | 23 | ||
24 | nft_set_pktinfo(&pkt, skb, state); | 24 | nft_set_pktinfo(&pkt, skb, state); |
25 | 25 | ||
26 | return nft_do_chain(&pkt, ops); | 26 | return nft_do_chain(&pkt, priv); |
27 | } | 27 | } |
28 | 28 | ||
29 | static struct nft_af_info nft_af_arp __read_mostly = { | 29 | static struct nft_af_info nft_af_arp __read_mostly = { |
diff --git a/net/ipv4/netfilter/nf_tables_ipv4.c b/net/ipv4/netfilter/nf_tables_ipv4.c index 805be5c9fcc3..ca9dc3c46c4f 100644 --- a/net/ipv4/netfilter/nf_tables_ipv4.c +++ b/net/ipv4/netfilter/nf_tables_ipv4.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <net/ip.h> | 18 | #include <net/ip.h> |
19 | #include <net/netfilter/nf_tables_ipv4.h> | 19 | #include <net/netfilter/nf_tables_ipv4.h> |
20 | 20 | ||
21 | static unsigned int nft_do_chain_ipv4(const struct nf_hook_ops *ops, | 21 | static unsigned int nft_do_chain_ipv4(void *priv, |
22 | struct sk_buff *skb, | 22 | struct sk_buff *skb, |
23 | const struct nf_hook_state *state) | 23 | const struct nf_hook_state *state) |
24 | { | 24 | { |
@@ -26,10 +26,10 @@ static unsigned int nft_do_chain_ipv4(const struct nf_hook_ops *ops, | |||
26 | 26 | ||
27 | nft_set_pktinfo_ipv4(&pkt, skb, state); | 27 | nft_set_pktinfo_ipv4(&pkt, skb, state); |
28 | 28 | ||
29 | return nft_do_chain(&pkt, ops); | 29 | return nft_do_chain(&pkt, priv); |
30 | } | 30 | } |
31 | 31 | ||
32 | static unsigned int nft_ipv4_output(const struct nf_hook_ops *ops, | 32 | static unsigned int nft_ipv4_output(void *priv, |
33 | struct sk_buff *skb, | 33 | struct sk_buff *skb, |
34 | const struct nf_hook_state *state) | 34 | const struct nf_hook_state *state) |
35 | { | 35 | { |
@@ -41,7 +41,7 @@ static unsigned int nft_ipv4_output(const struct nf_hook_ops *ops, | |||
41 | return NF_ACCEPT; | 41 | return NF_ACCEPT; |
42 | } | 42 | } |
43 | 43 | ||
44 | return nft_do_chain_ipv4(ops, skb, state); | 44 | return nft_do_chain_ipv4(priv, skb, state); |
45 | } | 45 | } |
46 | 46 | ||
47 | struct nft_af_info nft_af_ipv4 __read_mostly = { | 47 | struct nft_af_info nft_af_ipv4 __read_mostly = { |
diff --git a/net/ipv4/netfilter/nft_chain_nat_ipv4.c b/net/ipv4/netfilter/nft_chain_nat_ipv4.c index c3ffecf28d38..f5c66a7a4bf2 100644 --- a/net/ipv4/netfilter/nft_chain_nat_ipv4.c +++ b/net/ipv4/netfilter/nft_chain_nat_ipv4.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <net/netfilter/nf_nat_l3proto.h> | 26 | #include <net/netfilter/nf_nat_l3proto.h> |
27 | #include <net/ip.h> | 27 | #include <net/ip.h> |
28 | 28 | ||
29 | static unsigned int nft_nat_do_chain(const struct nf_hook_ops *ops, | 29 | static unsigned int nft_nat_do_chain(void *priv, |
30 | struct sk_buff *skb, | 30 | struct sk_buff *skb, |
31 | const struct nf_hook_state *state, | 31 | const struct nf_hook_state *state, |
32 | struct nf_conn *ct) | 32 | struct nf_conn *ct) |
@@ -35,35 +35,35 @@ static unsigned int nft_nat_do_chain(const struct nf_hook_ops *ops, | |||
35 | 35 | ||
36 | nft_set_pktinfo_ipv4(&pkt, skb, state); | 36 | nft_set_pktinfo_ipv4(&pkt, skb, state); |
37 | 37 | ||
38 | return nft_do_chain(&pkt, ops); | 38 | return nft_do_chain(&pkt, priv); |
39 | } | 39 | } |
40 | 40 | ||
41 | static unsigned int nft_nat_ipv4_fn(const struct nf_hook_ops *ops, | 41 | static unsigned int nft_nat_ipv4_fn(void *priv, |
42 | struct sk_buff *skb, | 42 | struct sk_buff *skb, |
43 | const struct nf_hook_state *state) | 43 | const struct nf_hook_state *state) |
44 | { | 44 | { |
45 | return nf_nat_ipv4_fn(ops, skb, state, nft_nat_do_chain); | 45 | return nf_nat_ipv4_fn(priv, skb, state, nft_nat_do_chain); |
46 | } | 46 | } |
47 | 47 | ||
48 | static unsigned int nft_nat_ipv4_in(const struct nf_hook_ops *ops, | 48 | static unsigned int nft_nat_ipv4_in(void *priv, |
49 | struct sk_buff *skb, | 49 | struct sk_buff *skb, |
50 | const struct nf_hook_state *state) | 50 | const struct nf_hook_state *state) |
51 | { | 51 | { |
52 | return nf_nat_ipv4_in(ops, skb, state, nft_nat_do_chain); | 52 | return nf_nat_ipv4_in(priv, skb, state, nft_nat_do_chain); |
53 | } | 53 | } |
54 | 54 | ||
55 | static unsigned int nft_nat_ipv4_out(const struct nf_hook_ops *ops, | 55 | static unsigned int nft_nat_ipv4_out(void *priv, |
56 | struct sk_buff *skb, | 56 | struct sk_buff *skb, |
57 | const struct nf_hook_state *state) | 57 | const struct nf_hook_state *state) |
58 | { | 58 | { |
59 | return nf_nat_ipv4_out(ops, skb, state, nft_nat_do_chain); | 59 | return nf_nat_ipv4_out(priv, skb, state, nft_nat_do_chain); |
60 | } | 60 | } |
61 | 61 | ||
62 | static unsigned int nft_nat_ipv4_local_fn(const struct nf_hook_ops *ops, | 62 | static unsigned int nft_nat_ipv4_local_fn(void *priv, |
63 | struct sk_buff *skb, | 63 | struct sk_buff *skb, |
64 | const struct nf_hook_state *state) | 64 | const struct nf_hook_state *state) |
65 | { | 65 | { |
66 | return nf_nat_ipv4_local_fn(ops, skb, state, nft_nat_do_chain); | 66 | return nf_nat_ipv4_local_fn(priv, skb, state, nft_nat_do_chain); |
67 | } | 67 | } |
68 | 68 | ||
69 | static const struct nf_chain_type nft_chain_nat_ipv4 = { | 69 | static const struct nf_chain_type nft_chain_nat_ipv4 = { |
diff --git a/net/ipv4/netfilter/nft_chain_route_ipv4.c b/net/ipv4/netfilter/nft_chain_route_ipv4.c index 2a1e3d8a3e43..9f486b302108 100644 --- a/net/ipv4/netfilter/nft_chain_route_ipv4.c +++ b/net/ipv4/netfilter/nft_chain_route_ipv4.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <net/route.h> | 21 | #include <net/route.h> |
22 | #include <net/ip.h> | 22 | #include <net/ip.h> |
23 | 23 | ||
24 | static unsigned int nf_route_table_hook(const struct nf_hook_ops *ops, | 24 | static unsigned int nf_route_table_hook(void *priv, |
25 | struct sk_buff *skb, | 25 | struct sk_buff *skb, |
26 | const struct nf_hook_state *state) | 26 | const struct nf_hook_state *state) |
27 | { | 27 | { |
@@ -45,7 +45,7 @@ static unsigned int nf_route_table_hook(const struct nf_hook_ops *ops, | |||
45 | daddr = iph->daddr; | 45 | daddr = iph->daddr; |
46 | tos = iph->tos; | 46 | tos = iph->tos; |
47 | 47 | ||
48 | ret = nft_do_chain(&pkt, ops); | 48 | ret = nft_do_chain(&pkt, priv); |
49 | if (ret != NF_DROP && ret != NF_QUEUE) { | 49 | if (ret != NF_DROP && ret != NF_QUEUE) { |
50 | iph = ip_hdr(skb); | 50 | iph = ip_hdr(skb); |
51 | 51 | ||
diff --git a/net/ipv6/netfilter/ip6t_SYNPROXY.c b/net/ipv6/netfilter/ip6t_SYNPROXY.c index 41451809b37c..c2356602158a 100644 --- a/net/ipv6/netfilter/ip6t_SYNPROXY.c +++ b/net/ipv6/netfilter/ip6t_SYNPROXY.c | |||
@@ -316,7 +316,7 @@ synproxy_tg6(struct sk_buff *skb, const struct xt_action_param *par) | |||
316 | return XT_CONTINUE; | 316 | return XT_CONTINUE; |
317 | } | 317 | } |
318 | 318 | ||
319 | static unsigned int ipv6_synproxy_hook(const struct nf_hook_ops *ops, | 319 | static unsigned int ipv6_synproxy_hook(void *priv, |
320 | struct sk_buff *skb, | 320 | struct sk_buff *skb, |
321 | const struct nf_hook_state *nhs) | 321 | const struct nf_hook_state *nhs) |
322 | { | 322 | { |
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index a7327f61b90c..8b277b983ca5 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c | |||
@@ -32,7 +32,7 @@ static const struct xt_table packet_filter = { | |||
32 | 32 | ||
33 | /* The work comes in here from netfilter.c. */ | 33 | /* The work comes in here from netfilter.c. */ |
34 | static unsigned int | 34 | static unsigned int |
35 | ip6table_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 35 | ip6table_filter_hook(void *priv, struct sk_buff *skb, |
36 | const struct nf_hook_state *state) | 36 | const struct nf_hook_state *state) |
37 | { | 37 | { |
38 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_filter); | 38 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_filter); |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index c2e061dcedf3..8745b592b2f6 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
@@ -75,7 +75,7 @@ ip6t_mangle_out(struct sk_buff *skb, const struct nf_hook_state *state) | |||
75 | 75 | ||
76 | /* The work comes in here from netfilter.c. */ | 76 | /* The work comes in here from netfilter.c. */ |
77 | static unsigned int | 77 | static unsigned int |
78 | ip6table_mangle_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 78 | ip6table_mangle_hook(void *priv, struct sk_buff *skb, |
79 | const struct nf_hook_state *state) | 79 | const struct nf_hook_state *state) |
80 | { | 80 | { |
81 | if (state->hook == NF_INET_LOCAL_OUT) | 81 | if (state->hook == NF_INET_LOCAL_OUT) |
diff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c index efa6754c4d06..abea175d5853 100644 --- a/net/ipv6/netfilter/ip6table_nat.c +++ b/net/ipv6/netfilter/ip6table_nat.c | |||
@@ -30,7 +30,7 @@ static const struct xt_table nf_nat_ipv6_table = { | |||
30 | .af = NFPROTO_IPV6, | 30 | .af = NFPROTO_IPV6, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static unsigned int ip6table_nat_do_chain(const struct nf_hook_ops *ops, | 33 | static unsigned int ip6table_nat_do_chain(void *priv, |
34 | struct sk_buff *skb, | 34 | struct sk_buff *skb, |
35 | const struct nf_hook_state *state, | 35 | const struct nf_hook_state *state, |
36 | struct nf_conn *ct) | 36 | struct nf_conn *ct) |
@@ -38,32 +38,32 @@ static unsigned int ip6table_nat_do_chain(const struct nf_hook_ops *ops, | |||
38 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_nat); | 38 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_nat); |
39 | } | 39 | } |
40 | 40 | ||
41 | static unsigned int ip6table_nat_fn(const struct nf_hook_ops *ops, | 41 | static unsigned int ip6table_nat_fn(void *priv, |
42 | struct sk_buff *skb, | 42 | struct sk_buff *skb, |
43 | const struct nf_hook_state *state) | 43 | const struct nf_hook_state *state) |
44 | { | 44 | { |
45 | return nf_nat_ipv6_fn(ops, skb, state, ip6table_nat_do_chain); | 45 | return nf_nat_ipv6_fn(priv, skb, state, ip6table_nat_do_chain); |
46 | } | 46 | } |
47 | 47 | ||
48 | static unsigned int ip6table_nat_in(const struct nf_hook_ops *ops, | 48 | static unsigned int ip6table_nat_in(void *priv, |
49 | struct sk_buff *skb, | 49 | struct sk_buff *skb, |
50 | const struct nf_hook_state *state) | 50 | const struct nf_hook_state *state) |
51 | { | 51 | { |
52 | return nf_nat_ipv6_in(ops, skb, state, ip6table_nat_do_chain); | 52 | return nf_nat_ipv6_in(priv, skb, state, ip6table_nat_do_chain); |
53 | } | 53 | } |
54 | 54 | ||
55 | static unsigned int ip6table_nat_out(const struct nf_hook_ops *ops, | 55 | static unsigned int ip6table_nat_out(void *priv, |
56 | struct sk_buff *skb, | 56 | struct sk_buff *skb, |
57 | const struct nf_hook_state *state) | 57 | const struct nf_hook_state *state) |
58 | { | 58 | { |
59 | return nf_nat_ipv6_out(ops, skb, state, ip6table_nat_do_chain); | 59 | return nf_nat_ipv6_out(priv, skb, state, ip6table_nat_do_chain); |
60 | } | 60 | } |
61 | 61 | ||
62 | static unsigned int ip6table_nat_local_fn(const struct nf_hook_ops *ops, | 62 | static unsigned int ip6table_nat_local_fn(void *priv, |
63 | struct sk_buff *skb, | 63 | struct sk_buff *skb, |
64 | const struct nf_hook_state *state) | 64 | const struct nf_hook_state *state) |
65 | { | 65 | { |
66 | return nf_nat_ipv6_local_fn(ops, skb, state, ip6table_nat_do_chain); | 66 | return nf_nat_ipv6_local_fn(priv, skb, state, ip6table_nat_do_chain); |
67 | } | 67 | } |
68 | 68 | ||
69 | static struct nf_hook_ops nf_nat_ipv6_ops[] __read_mostly = { | 69 | static struct nf_hook_ops nf_nat_ipv6_ops[] __read_mostly = { |
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c index fac6ad7c0a7c..9021963565c3 100644 --- a/net/ipv6/netfilter/ip6table_raw.c +++ b/net/ipv6/netfilter/ip6table_raw.c | |||
@@ -19,7 +19,7 @@ static const struct xt_table packet_raw = { | |||
19 | 19 | ||
20 | /* The work comes in here from netfilter.c. */ | 20 | /* The work comes in here from netfilter.c. */ |
21 | static unsigned int | 21 | static unsigned int |
22 | ip6table_raw_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 22 | ip6table_raw_hook(void *priv, struct sk_buff *skb, |
23 | const struct nf_hook_state *state) | 23 | const struct nf_hook_state *state) |
24 | { | 24 | { |
25 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_raw); | 25 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_raw); |
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c index 96c94fc240c8..0d856fedfeb0 100644 --- a/net/ipv6/netfilter/ip6table_security.c +++ b/net/ipv6/netfilter/ip6table_security.c | |||
@@ -36,7 +36,7 @@ static const struct xt_table security_table = { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | static unsigned int | 38 | static unsigned int |
39 | ip6table_security_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, | 39 | ip6table_security_hook(void *priv, struct sk_buff *skb, |
40 | const struct nf_hook_state *state) | 40 | const struct nf_hook_state *state) |
41 | { | 41 | { |
42 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_security); | 42 | return ip6t_do_table(skb, state, state->net->ipv6.ip6table_security); |
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index 339be1d59afc..dd83ad42f8f6 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -95,7 +95,7 @@ static int ipv6_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | |||
95 | return NF_ACCEPT; | 95 | return NF_ACCEPT; |
96 | } | 96 | } |
97 | 97 | ||
98 | static unsigned int ipv6_helper(const struct nf_hook_ops *ops, | 98 | static unsigned int ipv6_helper(void *priv, |
99 | struct sk_buff *skb, | 99 | struct sk_buff *skb, |
100 | const struct nf_hook_state *state) | 100 | const struct nf_hook_state *state) |
101 | { | 101 | { |
@@ -131,7 +131,7 @@ static unsigned int ipv6_helper(const struct nf_hook_ops *ops, | |||
131 | return helper->help(skb, protoff, ct, ctinfo); | 131 | return helper->help(skb, protoff, ct, ctinfo); |
132 | } | 132 | } |
133 | 133 | ||
134 | static unsigned int ipv6_confirm(const struct nf_hook_ops *ops, | 134 | static unsigned int ipv6_confirm(void *priv, |
135 | struct sk_buff *skb, | 135 | struct sk_buff *skb, |
136 | const struct nf_hook_state *state) | 136 | const struct nf_hook_state *state) |
137 | { | 137 | { |
@@ -165,14 +165,14 @@ out: | |||
165 | return nf_conntrack_confirm(skb); | 165 | return nf_conntrack_confirm(skb); |
166 | } | 166 | } |
167 | 167 | ||
168 | static unsigned int ipv6_conntrack_in(const struct nf_hook_ops *ops, | 168 | static unsigned int ipv6_conntrack_in(void *priv, |
169 | struct sk_buff *skb, | 169 | struct sk_buff *skb, |
170 | const struct nf_hook_state *state) | 170 | const struct nf_hook_state *state) |
171 | { | 171 | { |
172 | return nf_conntrack_in(state->net, PF_INET6, state->hook, skb); | 172 | return nf_conntrack_in(state->net, PF_INET6, state->hook, skb); |
173 | } | 173 | } |
174 | 174 | ||
175 | static unsigned int ipv6_conntrack_local(const struct nf_hook_ops *ops, | 175 | static unsigned int ipv6_conntrack_local(void *priv, |
176 | struct sk_buff *skb, | 176 | struct sk_buff *skb, |
177 | const struct nf_hook_state *state) | 177 | const struct nf_hook_state *state) |
178 | { | 178 | { |
diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c index a9c08520596b..a99baf63eccf 100644 --- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c +++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | |||
@@ -51,7 +51,7 @@ static enum ip6_defrag_users nf_ct6_defrag_user(unsigned int hooknum, | |||
51 | return IP6_DEFRAG_CONNTRACK_OUT + zone_id; | 51 | return IP6_DEFRAG_CONNTRACK_OUT + zone_id; |
52 | } | 52 | } |
53 | 53 | ||
54 | static unsigned int ipv6_defrag(const struct nf_hook_ops *ops, | 54 | static unsigned int ipv6_defrag(void *priv, |
55 | struct sk_buff *skb, | 55 | struct sk_buff *skb, |
56 | const struct nf_hook_state *state) | 56 | const struct nf_hook_state *state) |
57 | { | 57 | { |
diff --git a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c index 8bc94907dbd9..357f57ba47e4 100644 --- a/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | |||
@@ -262,9 +262,9 @@ int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, | |||
262 | EXPORT_SYMBOL_GPL(nf_nat_icmpv6_reply_translation); | 262 | EXPORT_SYMBOL_GPL(nf_nat_icmpv6_reply_translation); |
263 | 263 | ||
264 | unsigned int | 264 | unsigned int |
265 | nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 265 | nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, |
266 | const struct nf_hook_state *state, | 266 | const struct nf_hook_state *state, |
267 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 267 | unsigned int (*do_chain)(void *priv, |
268 | struct sk_buff *skb, | 268 | struct sk_buff *skb, |
269 | const struct nf_hook_state *state, | 269 | const struct nf_hook_state *state, |
270 | struct nf_conn *ct)) | 270 | struct nf_conn *ct)) |
@@ -317,7 +317,7 @@ nf_nat_ipv6_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
317 | if (!nf_nat_initialized(ct, maniptype)) { | 317 | if (!nf_nat_initialized(ct, maniptype)) { |
318 | unsigned int ret; | 318 | unsigned int ret; |
319 | 319 | ||
320 | ret = do_chain(ops, skb, state, ct); | 320 | ret = do_chain(priv, skb, state, ct); |
321 | if (ret != NF_ACCEPT) | 321 | if (ret != NF_ACCEPT) |
322 | return ret; | 322 | return ret; |
323 | 323 | ||
@@ -353,9 +353,9 @@ oif_changed: | |||
353 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_fn); | 353 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_fn); |
354 | 354 | ||
355 | unsigned int | 355 | unsigned int |
356 | nf_nat_ipv6_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | 356 | nf_nat_ipv6_in(void *priv, struct sk_buff *skb, |
357 | const struct nf_hook_state *state, | 357 | const struct nf_hook_state *state, |
358 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 358 | unsigned int (*do_chain)(void *priv, |
359 | struct sk_buff *skb, | 359 | struct sk_buff *skb, |
360 | const struct nf_hook_state *state, | 360 | const struct nf_hook_state *state, |
361 | struct nf_conn *ct)) | 361 | struct nf_conn *ct)) |
@@ -363,7 +363,7 @@ nf_nat_ipv6_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
363 | unsigned int ret; | 363 | unsigned int ret; |
364 | struct in6_addr daddr = ipv6_hdr(skb)->daddr; | 364 | struct in6_addr daddr = ipv6_hdr(skb)->daddr; |
365 | 365 | ||
366 | ret = nf_nat_ipv6_fn(ops, skb, state, do_chain); | 366 | ret = nf_nat_ipv6_fn(priv, skb, state, do_chain); |
367 | if (ret != NF_DROP && ret != NF_STOLEN && | 367 | if (ret != NF_DROP && ret != NF_STOLEN && |
368 | ipv6_addr_cmp(&daddr, &ipv6_hdr(skb)->daddr)) | 368 | ipv6_addr_cmp(&daddr, &ipv6_hdr(skb)->daddr)) |
369 | skb_dst_drop(skb); | 369 | skb_dst_drop(skb); |
@@ -373,9 +373,9 @@ nf_nat_ipv6_in(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
373 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_in); | 373 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_in); |
374 | 374 | ||
375 | unsigned int | 375 | unsigned int |
376 | nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | 376 | nf_nat_ipv6_out(void *priv, struct sk_buff *skb, |
377 | const struct nf_hook_state *state, | 377 | const struct nf_hook_state *state, |
378 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 378 | unsigned int (*do_chain)(void *priv, |
379 | struct sk_buff *skb, | 379 | struct sk_buff *skb, |
380 | const struct nf_hook_state *state, | 380 | const struct nf_hook_state *state, |
381 | struct nf_conn *ct)) | 381 | struct nf_conn *ct)) |
@@ -391,7 +391,7 @@ nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
391 | if (skb->len < sizeof(struct ipv6hdr)) | 391 | if (skb->len < sizeof(struct ipv6hdr)) |
392 | return NF_ACCEPT; | 392 | return NF_ACCEPT; |
393 | 393 | ||
394 | ret = nf_nat_ipv6_fn(ops, skb, state, do_chain); | 394 | ret = nf_nat_ipv6_fn(priv, skb, state, do_chain); |
395 | #ifdef CONFIG_XFRM | 395 | #ifdef CONFIG_XFRM |
396 | if (ret != NF_DROP && ret != NF_STOLEN && | 396 | if (ret != NF_DROP && ret != NF_STOLEN && |
397 | !(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) && | 397 | !(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) && |
@@ -414,9 +414,9 @@ nf_nat_ipv6_out(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
414 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_out); | 414 | EXPORT_SYMBOL_GPL(nf_nat_ipv6_out); |
415 | 415 | ||
416 | unsigned int | 416 | unsigned int |
417 | nf_nat_ipv6_local_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | 417 | nf_nat_ipv6_local_fn(void *priv, struct sk_buff *skb, |
418 | const struct nf_hook_state *state, | 418 | const struct nf_hook_state *state, |
419 | unsigned int (*do_chain)(const struct nf_hook_ops *ops, | 419 | unsigned int (*do_chain)(void *priv, |
420 | struct sk_buff *skb, | 420 | struct sk_buff *skb, |
421 | const struct nf_hook_state *state, | 421 | const struct nf_hook_state *state, |
422 | struct nf_conn *ct)) | 422 | struct nf_conn *ct)) |
@@ -430,7 +430,7 @@ nf_nat_ipv6_local_fn(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
430 | if (skb->len < sizeof(struct ipv6hdr)) | 430 | if (skb->len < sizeof(struct ipv6hdr)) |
431 | return NF_ACCEPT; | 431 | return NF_ACCEPT; |
432 | 432 | ||
433 | ret = nf_nat_ipv6_fn(ops, skb, state, do_chain); | 433 | ret = nf_nat_ipv6_fn(priv, skb, state, do_chain); |
434 | if (ret != NF_DROP && ret != NF_STOLEN && | 434 | if (ret != NF_DROP && ret != NF_STOLEN && |
435 | (ct = nf_ct_get(skb, &ctinfo)) != NULL) { | 435 | (ct = nf_ct_get(skb, &ctinfo)) != NULL) { |
436 | enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); | 436 | enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); |
diff --git a/net/ipv6/netfilter/nf_tables_ipv6.c b/net/ipv6/netfilter/nf_tables_ipv6.c index 41340b794f9b..120ea9131be0 100644 --- a/net/ipv6/netfilter/nf_tables_ipv6.c +++ b/net/ipv6/netfilter/nf_tables_ipv6.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <net/netfilter/nf_tables.h> | 16 | #include <net/netfilter/nf_tables.h> |
17 | #include <net/netfilter/nf_tables_ipv6.h> | 17 | #include <net/netfilter/nf_tables_ipv6.h> |
18 | 18 | ||
19 | static unsigned int nft_do_chain_ipv6(const struct nf_hook_ops *ops, | 19 | static unsigned int nft_do_chain_ipv6(void *priv, |
20 | struct sk_buff *skb, | 20 | struct sk_buff *skb, |
21 | const struct nf_hook_state *state) | 21 | const struct nf_hook_state *state) |
22 | { | 22 | { |
@@ -26,10 +26,10 @@ static unsigned int nft_do_chain_ipv6(const struct nf_hook_ops *ops, | |||
26 | if (nft_set_pktinfo_ipv6(&pkt, skb, state) < 0) | 26 | if (nft_set_pktinfo_ipv6(&pkt, skb, state) < 0) |
27 | return NF_DROP; | 27 | return NF_DROP; |
28 | 28 | ||
29 | return nft_do_chain(&pkt, ops); | 29 | return nft_do_chain(&pkt, priv); |
30 | } | 30 | } |
31 | 31 | ||
32 | static unsigned int nft_ipv6_output(const struct nf_hook_ops *ops, | 32 | static unsigned int nft_ipv6_output(void *priv, |
33 | struct sk_buff *skb, | 33 | struct sk_buff *skb, |
34 | const struct nf_hook_state *state) | 34 | const struct nf_hook_state *state) |
35 | { | 35 | { |
@@ -40,7 +40,7 @@ static unsigned int nft_ipv6_output(const struct nf_hook_ops *ops, | |||
40 | return NF_ACCEPT; | 40 | return NF_ACCEPT; |
41 | } | 41 | } |
42 | 42 | ||
43 | return nft_do_chain_ipv6(ops, skb, state); | 43 | return nft_do_chain_ipv6(priv, skb, state); |
44 | } | 44 | } |
45 | 45 | ||
46 | struct nft_af_info nft_af_ipv6 __read_mostly = { | 46 | struct nft_af_info nft_af_ipv6 __read_mostly = { |
diff --git a/net/ipv6/netfilter/nft_chain_nat_ipv6.c b/net/ipv6/netfilter/nft_chain_nat_ipv6.c index e96feaefeb14..443cd306c0b0 100644 --- a/net/ipv6/netfilter/nft_chain_nat_ipv6.c +++ b/net/ipv6/netfilter/nft_chain_nat_ipv6.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <net/netfilter/nf_nat_l3proto.h> | 24 | #include <net/netfilter/nf_nat_l3proto.h> |
25 | #include <net/ipv6.h> | 25 | #include <net/ipv6.h> |
26 | 26 | ||
27 | static unsigned int nft_nat_do_chain(const struct nf_hook_ops *ops, | 27 | static unsigned int nft_nat_do_chain(void *priv, |
28 | struct sk_buff *skb, | 28 | struct sk_buff *skb, |
29 | const struct nf_hook_state *state, | 29 | const struct nf_hook_state *state, |
30 | struct nf_conn *ct) | 30 | struct nf_conn *ct) |
@@ -33,35 +33,35 @@ static unsigned int nft_nat_do_chain(const struct nf_hook_ops *ops, | |||
33 | 33 | ||
34 | nft_set_pktinfo_ipv6(&pkt, skb, state); | 34 | nft_set_pktinfo_ipv6(&pkt, skb, state); |
35 | 35 | ||
36 | return nft_do_chain(&pkt, ops); | 36 | return nft_do_chain(&pkt, priv); |
37 | } | 37 | } |
38 | 38 | ||
39 | static unsigned int nft_nat_ipv6_fn(const struct nf_hook_ops *ops, | 39 | static unsigned int nft_nat_ipv6_fn(void *priv, |
40 | struct sk_buff *skb, | 40 | struct sk_buff *skb, |
41 | const struct nf_hook_state *state) | 41 | const struct nf_hook_state *state) |
42 | { | 42 | { |
43 | return nf_nat_ipv6_fn(ops, skb, state, nft_nat_do_chain); | 43 | return nf_nat_ipv6_fn(priv, skb, state, nft_nat_do_chain); |
44 | } | 44 | } |
45 | 45 | ||
46 | static unsigned int nft_nat_ipv6_in(const struct nf_hook_ops *ops, | 46 | static unsigned int nft_nat_ipv6_in(void *priv, |
47 | struct sk_buff *skb, | 47 | struct sk_buff *skb, |
48 | const struct nf_hook_state *state) | 48 | const struct nf_hook_state *state) |
49 | { | 49 | { |
50 | return nf_nat_ipv6_in(ops, skb, state, nft_nat_do_chain); | 50 | return nf_nat_ipv6_in(priv, skb, state, nft_nat_do_chain); |
51 | } | 51 | } |
52 | 52 | ||
53 | static unsigned int nft_nat_ipv6_out(const struct nf_hook_ops *ops, | 53 | static unsigned int nft_nat_ipv6_out(void *priv, |
54 | struct sk_buff *skb, | 54 | struct sk_buff *skb, |
55 | const struct nf_hook_state *state) | 55 | const struct nf_hook_state *state) |
56 | { | 56 | { |
57 | return nf_nat_ipv6_out(ops, skb, state, nft_nat_do_chain); | 57 | return nf_nat_ipv6_out(priv, skb, state, nft_nat_do_chain); |
58 | } | 58 | } |
59 | 59 | ||
60 | static unsigned int nft_nat_ipv6_local_fn(const struct nf_hook_ops *ops, | 60 | static unsigned int nft_nat_ipv6_local_fn(void *priv, |
61 | struct sk_buff *skb, | 61 | struct sk_buff *skb, |
62 | const struct nf_hook_state *state) | 62 | const struct nf_hook_state *state) |
63 | { | 63 | { |
64 | return nf_nat_ipv6_local_fn(ops, skb, state, nft_nat_do_chain); | 64 | return nf_nat_ipv6_local_fn(priv, skb, state, nft_nat_do_chain); |
65 | } | 65 | } |
66 | 66 | ||
67 | static const struct nf_chain_type nft_chain_nat_ipv6 = { | 67 | static const struct nf_chain_type nft_chain_nat_ipv6 = { |
diff --git a/net/ipv6/netfilter/nft_chain_route_ipv6.c b/net/ipv6/netfilter/nft_chain_route_ipv6.c index d1bcd2ed7bcc..d42bbc1d7555 100644 --- a/net/ipv6/netfilter/nft_chain_route_ipv6.c +++ b/net/ipv6/netfilter/nft_chain_route_ipv6.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <net/netfilter/nf_tables_ipv6.h> | 22 | #include <net/netfilter/nf_tables_ipv6.h> |
23 | #include <net/route.h> | 23 | #include <net/route.h> |
24 | 24 | ||
25 | static unsigned int nf_route_table_hook(const struct nf_hook_ops *ops, | 25 | static unsigned int nf_route_table_hook(void *priv, |
26 | struct sk_buff *skb, | 26 | struct sk_buff *skb, |
27 | const struct nf_hook_state *state) | 27 | const struct nf_hook_state *state) |
28 | { | 28 | { |
@@ -45,7 +45,7 @@ static unsigned int nf_route_table_hook(const struct nf_hook_ops *ops, | |||
45 | /* flowlabel and prio (includes version, which shouldn't change either */ | 45 | /* flowlabel and prio (includes version, which shouldn't change either */ |
46 | flowlabel = *((u32 *)ipv6_hdr(skb)); | 46 | flowlabel = *((u32 *)ipv6_hdr(skb)); |
47 | 47 | ||
48 | ret = nft_do_chain(&pkt, ops); | 48 | ret = nft_do_chain(&pkt, priv); |
49 | if (ret != NF_DROP && ret != NF_QUEUE && | 49 | if (ret != NF_DROP && ret != NF_QUEUE && |
50 | (memcmp(&ipv6_hdr(skb)->saddr, &saddr, sizeof(saddr)) || | 50 | (memcmp(&ipv6_hdr(skb)->saddr, &saddr, sizeof(saddr)) || |
51 | memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) || | 51 | memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) || |
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 8e47f8113495..2e907335ee81 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -269,7 +269,7 @@ unsigned int nf_iterate(struct list_head *head, | |||
269 | /* Optimization: we don't need to hold module | 269 | /* Optimization: we don't need to hold module |
270 | reference here, since function can't sleep. --RR */ | 270 | reference here, since function can't sleep. --RR */ |
271 | repeat: | 271 | repeat: |
272 | verdict = (*elemp)->hook(*elemp, skb, state); | 272 | verdict = (*elemp)->hook((*elemp)->priv, skb, state); |
273 | if (verdict != NF_ACCEPT) { | 273 | if (verdict != NF_ACCEPT) { |
274 | #ifdef CONFIG_NETFILTER_DEBUG | 274 | #ifdef CONFIG_NETFILTER_DEBUG |
275 | if (unlikely((verdict & NF_VERDICT_MASK) | 275 | if (unlikely((verdict & NF_VERDICT_MASK) |
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 40e3c85f83b5..1fa12edccbcc 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -1311,7 +1311,7 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1311 | * Check if packet is reply for established ip_vs_conn. | 1311 | * Check if packet is reply for established ip_vs_conn. |
1312 | */ | 1312 | */ |
1313 | static unsigned int | 1313 | static unsigned int |
1314 | ip_vs_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1314 | ip_vs_reply4(void *priv, struct sk_buff *skb, |
1315 | const struct nf_hook_state *state) | 1315 | const struct nf_hook_state *state) |
1316 | { | 1316 | { |
1317 | return ip_vs_out(state->hook, skb, AF_INET); | 1317 | return ip_vs_out(state->hook, skb, AF_INET); |
@@ -1322,7 +1322,7 @@ ip_vs_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1322 | * Check if packet is reply for established ip_vs_conn. | 1322 | * Check if packet is reply for established ip_vs_conn. |
1323 | */ | 1323 | */ |
1324 | static unsigned int | 1324 | static unsigned int |
1325 | ip_vs_local_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1325 | ip_vs_local_reply4(void *priv, struct sk_buff *skb, |
1326 | const struct nf_hook_state *state) | 1326 | const struct nf_hook_state *state) |
1327 | { | 1327 | { |
1328 | return ip_vs_out(state->hook, skb, AF_INET); | 1328 | return ip_vs_out(state->hook, skb, AF_INET); |
@@ -1336,7 +1336,7 @@ ip_vs_local_reply4(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1336 | * Check if packet is reply for established ip_vs_conn. | 1336 | * Check if packet is reply for established ip_vs_conn. |
1337 | */ | 1337 | */ |
1338 | static unsigned int | 1338 | static unsigned int |
1339 | ip_vs_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1339 | ip_vs_reply6(void *priv, struct sk_buff *skb, |
1340 | const struct nf_hook_state *state) | 1340 | const struct nf_hook_state *state) |
1341 | { | 1341 | { |
1342 | return ip_vs_out(state->hook, skb, AF_INET6); | 1342 | return ip_vs_out(state->hook, skb, AF_INET6); |
@@ -1347,7 +1347,7 @@ ip_vs_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1347 | * Check if packet is reply for established ip_vs_conn. | 1347 | * Check if packet is reply for established ip_vs_conn. |
1348 | */ | 1348 | */ |
1349 | static unsigned int | 1349 | static unsigned int |
1350 | ip_vs_local_reply6(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1350 | ip_vs_local_reply6(void *priv, struct sk_buff *skb, |
1351 | const struct nf_hook_state *state) | 1351 | const struct nf_hook_state *state) |
1352 | { | 1352 | { |
1353 | return ip_vs_out(state->hook, skb, AF_INET6); | 1353 | return ip_vs_out(state->hook, skb, AF_INET6); |
@@ -1847,7 +1847,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af) | |||
1847 | * Schedule and forward packets from remote clients | 1847 | * Schedule and forward packets from remote clients |
1848 | */ | 1848 | */ |
1849 | static unsigned int | 1849 | static unsigned int |
1850 | ip_vs_remote_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1850 | ip_vs_remote_request4(void *priv, struct sk_buff *skb, |
1851 | const struct nf_hook_state *state) | 1851 | const struct nf_hook_state *state) |
1852 | { | 1852 | { |
1853 | return ip_vs_in(state->hook, skb, AF_INET); | 1853 | return ip_vs_in(state->hook, skb, AF_INET); |
@@ -1858,7 +1858,7 @@ ip_vs_remote_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1858 | * Schedule and forward packets from local clients | 1858 | * Schedule and forward packets from local clients |
1859 | */ | 1859 | */ |
1860 | static unsigned int | 1860 | static unsigned int |
1861 | ip_vs_local_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1861 | ip_vs_local_request4(void *priv, struct sk_buff *skb, |
1862 | const struct nf_hook_state *state) | 1862 | const struct nf_hook_state *state) |
1863 | { | 1863 | { |
1864 | return ip_vs_in(state->hook, skb, AF_INET); | 1864 | return ip_vs_in(state->hook, skb, AF_INET); |
@@ -1871,7 +1871,7 @@ ip_vs_local_request4(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1871 | * Schedule and forward packets from remote clients | 1871 | * Schedule and forward packets from remote clients |
1872 | */ | 1872 | */ |
1873 | static unsigned int | 1873 | static unsigned int |
1874 | ip_vs_remote_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1874 | ip_vs_remote_request6(void *priv, struct sk_buff *skb, |
1875 | const struct nf_hook_state *state) | 1875 | const struct nf_hook_state *state) |
1876 | { | 1876 | { |
1877 | return ip_vs_in(state->hook, skb, AF_INET6); | 1877 | return ip_vs_in(state->hook, skb, AF_INET6); |
@@ -1882,7 +1882,7 @@ ip_vs_remote_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1882 | * Schedule and forward packets from local clients | 1882 | * Schedule and forward packets from local clients |
1883 | */ | 1883 | */ |
1884 | static unsigned int | 1884 | static unsigned int |
1885 | ip_vs_local_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1885 | ip_vs_local_request6(void *priv, struct sk_buff *skb, |
1886 | const struct nf_hook_state *state) | 1886 | const struct nf_hook_state *state) |
1887 | { | 1887 | { |
1888 | return ip_vs_in(state->hook, skb, AF_INET6); | 1888 | return ip_vs_in(state->hook, skb, AF_INET6); |
@@ -1901,7 +1901,7 @@ ip_vs_local_request6(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1901 | * and send them to ip_vs_in_icmp. | 1901 | * and send them to ip_vs_in_icmp. |
1902 | */ | 1902 | */ |
1903 | static unsigned int | 1903 | static unsigned int |
1904 | ip_vs_forward_icmp(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1904 | ip_vs_forward_icmp(void *priv, struct sk_buff *skb, |
1905 | const struct nf_hook_state *state) | 1905 | const struct nf_hook_state *state) |
1906 | { | 1906 | { |
1907 | int r; | 1907 | int r; |
@@ -1917,12 +1917,12 @@ ip_vs_forward_icmp(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1917 | if (unlikely(sysctl_backup_only(ipvs) || !ipvs->enable)) | 1917 | if (unlikely(sysctl_backup_only(ipvs) || !ipvs->enable)) |
1918 | return NF_ACCEPT; | 1918 | return NF_ACCEPT; |
1919 | 1919 | ||
1920 | return ip_vs_in_icmp(skb, &r, ops->hooknum); | 1920 | return ip_vs_in_icmp(skb, &r, state->hook); |
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | #ifdef CONFIG_IP_VS_IPV6 | 1923 | #ifdef CONFIG_IP_VS_IPV6 |
1924 | static unsigned int | 1924 | static unsigned int |
1925 | ip_vs_forward_icmp_v6(const struct nf_hook_ops *ops, struct sk_buff *skb, | 1925 | ip_vs_forward_icmp_v6(void *priv, struct sk_buff *skb, |
1926 | const struct nf_hook_state *state) | 1926 | const struct nf_hook_state *state) |
1927 | { | 1927 | { |
1928 | int r; | 1928 | int r; |
@@ -1940,7 +1940,7 @@ ip_vs_forward_icmp_v6(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
1940 | if (unlikely(sysctl_backup_only(ipvs) || !ipvs->enable)) | 1940 | if (unlikely(sysctl_backup_only(ipvs) || !ipvs->enable)) |
1941 | return NF_ACCEPT; | 1941 | return NF_ACCEPT; |
1942 | 1942 | ||
1943 | return ip_vs_in_icmp_v6(skb, &r, ops->hooknum, &iphdr); | 1943 | return ip_vs_in_icmp_v6(skb, &r, state->hook, &iphdr); |
1944 | } | 1944 | } |
1945 | #endif | 1945 | #endif |
1946 | 1946 | ||
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index e5c1f332e45e..f3695a497408 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c | |||
@@ -109,9 +109,9 @@ struct nft_jumpstack { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | unsigned int | 111 | unsigned int |
112 | nft_do_chain(struct nft_pktinfo *pkt, const struct nf_hook_ops *ops) | 112 | nft_do_chain(struct nft_pktinfo *pkt, void *priv) |
113 | { | 113 | { |
114 | const struct nft_chain *chain = ops->priv, *basechain = chain; | 114 | const struct nft_chain *chain = priv, *basechain = chain; |
115 | const struct net *net = pkt->net; | 115 | const struct net *net = pkt->net; |
116 | const struct nft_rule *rule; | 116 | const struct nft_rule *rule; |
117 | const struct nft_expr *expr, *last; | 117 | const struct nft_expr *expr, *last; |
diff --git a/net/netfilter/nf_tables_netdev.c b/net/netfilter/nf_tables_netdev.c index db416a3396e9..7b9c053ba750 100644 --- a/net/netfilter/nf_tables_netdev.c +++ b/net/netfilter/nf_tables_netdev.c | |||
@@ -89,7 +89,7 @@ static inline void nft_netdev_set_pktinfo_ipv6(struct nft_pktinfo *pkt, | |||
89 | } | 89 | } |
90 | 90 | ||
91 | static unsigned int | 91 | static unsigned int |
92 | nft_do_chain_netdev(const struct nf_hook_ops *ops, struct sk_buff *skb, | 92 | nft_do_chain_netdev(void *priv, struct sk_buff *skb, |
93 | const struct nf_hook_state *state) | 93 | const struct nf_hook_state *state) |
94 | { | 94 | { |
95 | struct nft_pktinfo pkt; | 95 | struct nft_pktinfo pkt; |
@@ -106,7 +106,7 @@ nft_do_chain_netdev(const struct nf_hook_ops *ops, struct sk_buff *skb, | |||
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | 108 | ||
109 | return nft_do_chain(&pkt, ops); | 109 | return nft_do_chain(&pkt, priv); |
110 | } | 110 | } |
111 | 111 | ||
112 | static struct nft_af_info nft_af_netdev __read_mostly = { | 112 | static struct nft_af_info nft_af_netdev __read_mostly = { |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e4369d86e588..64340160f4ac 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4866,7 +4866,7 @@ static unsigned int selinux_ip_forward(struct sk_buff *skb, | |||
4866 | return NF_ACCEPT; | 4866 | return NF_ACCEPT; |
4867 | } | 4867 | } |
4868 | 4868 | ||
4869 | static unsigned int selinux_ipv4_forward(const struct nf_hook_ops *ops, | 4869 | static unsigned int selinux_ipv4_forward(void *priv, |
4870 | struct sk_buff *skb, | 4870 | struct sk_buff *skb, |
4871 | const struct nf_hook_state *state) | 4871 | const struct nf_hook_state *state) |
4872 | { | 4872 | { |
@@ -4874,7 +4874,7 @@ static unsigned int selinux_ipv4_forward(const struct nf_hook_ops *ops, | |||
4874 | } | 4874 | } |
4875 | 4875 | ||
4876 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 4876 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
4877 | static unsigned int selinux_ipv6_forward(const struct nf_hook_ops *ops, | 4877 | static unsigned int selinux_ipv6_forward(void *priv, |
4878 | struct sk_buff *skb, | 4878 | struct sk_buff *skb, |
4879 | const struct nf_hook_state *state) | 4879 | const struct nf_hook_state *state) |
4880 | { | 4880 | { |
@@ -4924,7 +4924,7 @@ static unsigned int selinux_ip_output(struct sk_buff *skb, | |||
4924 | return NF_ACCEPT; | 4924 | return NF_ACCEPT; |
4925 | } | 4925 | } |
4926 | 4926 | ||
4927 | static unsigned int selinux_ipv4_output(const struct nf_hook_ops *ops, | 4927 | static unsigned int selinux_ipv4_output(void *priv, |
4928 | struct sk_buff *skb, | 4928 | struct sk_buff *skb, |
4929 | const struct nf_hook_state *state) | 4929 | const struct nf_hook_state *state) |
4930 | { | 4930 | { |
@@ -5099,7 +5099,7 @@ static unsigned int selinux_ip_postroute(struct sk_buff *skb, | |||
5099 | return NF_ACCEPT; | 5099 | return NF_ACCEPT; |
5100 | } | 5100 | } |
5101 | 5101 | ||
5102 | static unsigned int selinux_ipv4_postroute(const struct nf_hook_ops *ops, | 5102 | static unsigned int selinux_ipv4_postroute(void *priv, |
5103 | struct sk_buff *skb, | 5103 | struct sk_buff *skb, |
5104 | const struct nf_hook_state *state) | 5104 | const struct nf_hook_state *state) |
5105 | { | 5105 | { |
@@ -5107,7 +5107,7 @@ static unsigned int selinux_ipv4_postroute(const struct nf_hook_ops *ops, | |||
5107 | } | 5107 | } |
5108 | 5108 | ||
5109 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 5109 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
5110 | static unsigned int selinux_ipv6_postroute(const struct nf_hook_ops *ops, | 5110 | static unsigned int selinux_ipv6_postroute(void *priv, |
5111 | struct sk_buff *skb, | 5111 | struct sk_buff *skb, |
5112 | const struct nf_hook_state *state) | 5112 | const struct nf_hook_state *state) |
5113 | { | 5113 | { |
diff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c index a455cfc9ec1f..a9e41da05d28 100644 --- a/security/smack/smack_netfilter.c +++ b/security/smack/smack_netfilter.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 22 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
23 | 23 | ||
24 | static unsigned int smack_ipv6_output(const struct nf_hook_ops *ops, | 24 | static unsigned int smack_ipv6_output(void *priv, |
25 | struct sk_buff *skb, | 25 | struct sk_buff *skb, |
26 | const struct nf_hook_state *state) | 26 | const struct nf_hook_state *state) |
27 | { | 27 | { |
@@ -38,7 +38,7 @@ static unsigned int smack_ipv6_output(const struct nf_hook_ops *ops, | |||
38 | } | 38 | } |
39 | #endif /* IPV6 */ | 39 | #endif /* IPV6 */ |
40 | 40 | ||
41 | static unsigned int smack_ipv4_output(const struct nf_hook_ops *ops, | 41 | static unsigned int smack_ipv4_output(void *priv, |
42 | struct sk_buff *skb, | 42 | struct sk_buff *skb, |
43 | const struct nf_hook_state *state) | 43 | const struct nf_hook_state *state) |
44 | { | 44 | { |