Home
last modified time | relevance | path

Searched refs:hooknum (Results 1 – 25 of 39) sorted by relevance

12

/net/netfilter/
Dcore.c273 nf_hook_entry_head(struct net *net, int pf, unsigned int hooknum, in nf_hook_entry_head() argument
281 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_arp) <= hooknum)) in nf_hook_entry_head()
283 return net->nf.hooks_arp + hooknum; in nf_hook_entry_head()
287 if (WARN_ON_ONCE(hooknum >= NF_INET_NUMHOOKS)) in nf_hook_entry_head()
289 return get_nf_hooks_bridge(net) + hooknum; in nf_hook_entry_head()
293 if (WARN_ON_ONCE(hooknum != NF_INET_INGRESS)) in nf_hook_entry_head()
302 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv4) <= hooknum)) in nf_hook_entry_head()
304 return net->nf.hooks_ipv4 + hooknum; in nf_hook_entry_head()
306 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv6) <= hooknum)) in nf_hook_entry_head()
308 return net->nf.hooks_ipv6 + hooknum; in nf_hook_entry_head()
[all …]
Dnf_nat_redirect.c51 unsigned int hooknum) in nf_nat_redirect_ipv4() argument
55 WARN_ON(hooknum != NF_INET_PRE_ROUTING && in nf_nat_redirect_ipv4()
56 hooknum != NF_INET_LOCAL_OUT); in nf_nat_redirect_ipv4()
59 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv4()
105 unsigned int hooknum) in nf_nat_redirect_ipv6() argument
109 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv6()
Dnfnetlink_hook.c122 u32 hooknum; in nfnl_hook_dump_one() local
160 if (ops->pf == NFPROTO_INET && ops->hooknum == NF_INET_INGRESS) in nfnl_hook_dump_one()
161 hooknum = NF_NETDEV_INGRESS; in nfnl_hook_dump_one()
163 hooknum = ops->hooknum; in nfnl_hook_dump_one()
165 ret = nla_put_be32(nlskb, NFNLA_HOOK_HOOKNUM, htonl(hooknum)); in nfnl_hook_dump_one()
288 u32 hooknum; in nfnl_hook_dump_start() local
290 hooknum = ntohl(nla_get_be32(nla[NFNLA_HOOK_HOOKNUM])); in nfnl_hook_dump_start()
291 if (hooknum > 255) in nfnl_hook_dump_start()
303 head = nfnl_hook_entries_head(family, hooknum, net, name); in nfnl_hook_dump_start()
315 ctx->hook = hooknum; in nfnl_hook_dump_start()
Dxt_repldata.h20 unsigned int bytes = 0, hooknum = 0, i = 0; \
38 for (; hook_mask != 0; hook_mask >>= 1, ++hooknum) { \
41 tbl->repl.hook_entry[hooknum] = bytes; \
42 tbl->repl.underflow[hooknum] = bytes; \
Dnf_nat_core.c668 nf_nat_alloc_null_binding(struct nf_conn *ct, unsigned int hooknum) in nf_nat_alloc_null_binding() argument
670 return __nf_nat_alloc_null_binding(ct, HOOK2MANIP(hooknum)); in nf_nat_alloc_null_binding()
677 unsigned int hooknum, in nf_nat_packet() argument
680 enum nf_nat_manip_type mtype = HOOK2MANIP(hooknum); in nf_nat_packet()
1001 unsigned int hooknum = ops->hooknum; in nf_nat_register_fn() local
1011 if (orig_nat_ops[i].hooknum == hooknum) { in nf_nat_register_fn()
1012 hooknum = i; in nf_nat_register_fn()
1056 priv = nat_ops[hooknum].priv; in nf_nat_register_fn()
1077 int hooknum = ops->hooknum; in nf_nat_unregister_fn() local
1093 if (nat_ops[i].hooknum == hooknum) { in nf_nat_unregister_fn()
[all …]
Dnf_nat_proto.c562 unsigned int hooknum) in nf_nat_icmp_reply_translation() argument
569 enum nf_nat_manip_type manip = HOOK2MANIP(hooknum); in nf_nat_icmp_reply_translation()
578 if (nf_ip_checksum(skb, hooknum, hdrlen, IPPROTO_ICMP)) in nf_nat_icmp_reply_translation()
796 .hooknum = NF_INET_PRE_ROUTING,
803 .hooknum = NF_INET_POST_ROUTING,
810 .hooknum = NF_INET_LOCAL_OUT,
817 .hooknum = NF_INET_LOCAL_IN,
839 unsigned int hooknum, in nf_nat_icmpv6_reply_translation() argument
847 enum nf_nat_manip_type manip = HOOK2MANIP(hooknum); in nf_nat_icmpv6_reply_translation()
855 if (nf_ip6_checksum(skb, hooknum, hdrlen, IPPROTO_ICMPV6)) in nf_nat_icmpv6_reply_translation()
[all …]
Dnf_log_syslog.c105 unsigned int hooknum, const struct sk_buff *skb, in nf_log_dump_packet_common() argument
128 unsigned int hooknum, const struct sk_buff *skb, in nf_log_arp_packet() argument
145 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, loginfo, in nf_log_arp_packet()
809 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip_packet() argument
826 nf_log_dump_packet_common(m, pf, hooknum, skb, in, in nf_log_ip_packet()
903 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip6_packet() argument
920 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, in nf_log_ip6_packet()
939 unsigned int hooknum, in nf_log_netdev_packet() argument
948 nf_log_ip_packet(net, pf, hooknum, skb, in, out, loginfo, prefix); in nf_log_netdev_packet()
951 nf_log_ip6_packet(net, pf, hooknum, skb, in, out, loginfo, prefix); in nf_log_netdev_packet()
[all …]
Dnf_conntrack_proto.c210 .hooknum = NF_INET_PRE_ROUTING,
216 .hooknum = NF_INET_LOCAL_OUT,
222 .hooknum = NF_INET_POST_ROUTING,
228 .hooknum = NF_INET_LOCAL_IN,
405 .hooknum = NF_INET_PRE_ROUTING,
411 .hooknum = NF_INET_LOCAL_OUT,
417 .hooknum = NF_INET_POST_ROUTING,
423 .hooknum = NF_INET_LOCAL_IN,
Dnf_queue.c279 static struct nf_hook_entries *nf_hook_entries_head(const struct net *net, u8 pf, u8 hooknum) in nf_hook_entries_head() argument
284 return rcu_dereference(get_nf_hooks_bridge(net)[hooknum]); in nf_hook_entries_head()
287 return rcu_dereference(net->nf.hooks_ipv4[hooknum]); in nf_hook_entries_head()
289 return rcu_dereference(net->nf.hooks_ipv6[hooknum]); in nf_hook_entries_head()
Dxt_quota2.c79 static void quota2_log(unsigned int hooknum, in quota2_log() argument
112 pm->hook = hooknum; in quota2_log()
125 static void quota2_log(unsigned int hooknum, in quota2_log() argument
Dnf_log.c208 unsigned int hooknum, in nf_log_packet() argument
229 logger->logfn(net, pf, hooknum, skb, in, out, loginfo, prefix); in nf_log_packet()
237 unsigned int hooknum, in nf_log_trace() argument
253 logger->logfn(net, pf, hooknum, skb, in, out, loginfo, prefix); in nf_log_trace()
Dnfnetlink_osf.c198 int hooknum, struct net_device *in, struct net_device *out, in nf_osf_match() argument
235 nf_log_packet(net, family, hooknum, skb, in nf_osf_match()
249 nf_log_packet(net, family, hooknum, skb, in, out, NULL, in nf_osf_match()
Dnf_nat_masquerade.c27 nf_nat_masquerade_ipv4(struct sk_buff *skb, unsigned int hooknum, in nf_nat_masquerade_ipv4() argument
38 WARN_ON(hooknum != NF_INET_POST_ROUTING); in nf_nat_masquerade_ipv4()
/net/netfilter/ipvs/
Dip_vs_core.c697 static inline enum ip_defrag_users ip_vs_defrag_user(unsigned int hooknum) in ip_vs_defrag_user() argument
699 if (NF_INET_LOCAL_IN == hooknum) in ip_vs_defrag_user()
701 if (NF_INET_FORWARD == hooknum) in ip_vs_defrag_user()
721 struct sk_buff *skb, unsigned int hooknum) in ip_vs_route_me_harder() argument
726 if (NF_INET_LOCAL_IN == hooknum) in ip_vs_route_me_harder()
861 unsigned int hooknum) in handle_response_icmp() argument
889 if (ip_vs_route_me_harder(cp->ipvs, af, skb, hooknum)) in handle_response_icmp()
915 int *related, unsigned int hooknum) in ip_vs_out_icmp() argument
930 if (ip_vs_gather_frags(ipvs, skb, ip_vs_defrag_user(hooknum))) in ip_vs_out_icmp()
986 pp, ciph.len, ihl, hooknum); in ip_vs_out_icmp()
[all …]
/net/ipv6/netfilter/
Dnf_defrag_ipv6_hooks.c30 static enum ip6_defrag_users nf_ct6_defrag_user(unsigned int hooknum, in nf_ct6_defrag_user() argument
45 if (hooknum == NF_INET_PRE_ROUTING) in nf_ct6_defrag_user()
79 .hooknum = NF_INET_PRE_ROUTING,
85 .hooknum = NF_INET_LOCAL_OUT,
Dip6table_nat.c45 .hooknum = NF_INET_PRE_ROUTING,
51 .hooknum = NF_INET_POST_ROUTING,
57 .hooknum = NF_INET_LOCAL_OUT,
63 .hooknum = NF_INET_LOCAL_IN,
Dnf_dup_ipv6.c47 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum, in nf_dup_ipv6() argument
60 if (hooknum == NF_INET_PRE_ROUTING || in nf_dup_ipv6()
61 hooknum == NF_INET_LOCAL_IN) { in nf_dup_ipv6()
Dnf_reject_ipv6.c398 unsigned char code, unsigned int hooknum) in nf_send_unreach6() argument
400 if (!reject6_csum_ok(skb_in, hooknum)) in nf_send_unreach6()
403 if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL) in nf_send_unreach6()
406 if ((hooknum == NF_INET_PRE_ROUTING || hooknum == NF_INET_INGRESS) && in nf_send_unreach6()
/net/ipv4/netfilter/
Dnf_defrag_ipv4.c40 static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum, in nf_ct_defrag_user() argument
55 if (hooknum == NF_INET_PRE_ROUTING) in nf_ct_defrag_user()
96 .hooknum = NF_INET_PRE_ROUTING,
102 .hooknum = NF_INET_LOCAL_OUT,
Diptable_nat.c43 .hooknum = NF_INET_PRE_ROUTING,
49 .hooknum = NF_INET_POST_ROUTING,
55 .hooknum = NF_INET_LOCAL_OUT,
61 .hooknum = NF_INET_LOCAL_IN,
Dnf_dup_ipv4.c50 void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum, in nf_dup_ipv4() argument
82 if (hooknum == NF_INET_PRE_ROUTING || in nf_dup_ipv4()
83 hooknum == NF_INET_LOCAL_IN) in nf_dup_ipv4()
/net/bridge/netfilter/
Debtable_filter.c64 .hooknum = NF_BR_LOCAL_IN,
70 .hooknum = NF_BR_FORWARD,
76 .hooknum = NF_BR_LOCAL_OUT,
Debtable_nat.c63 .hooknum = NF_BR_LOCAL_OUT,
69 .hooknum = NF_BR_POST_ROUTING,
75 .hooknum = NF_BR_PRE_ROUTING,
/net/bridge/
Dbr_netfilter_hooks.c935 .hooknum = NF_BR_PRE_ROUTING,
941 .hooknum = NF_BR_FORWARD,
947 .hooknum = NF_BR_FORWARD,
953 .hooknum = NF_BR_POST_ROUTING,
959 .hooknum = NF_INET_PRE_ROUTING,
965 .hooknum = NF_INET_PRE_ROUTING,
/net/sched/
Dact_ct.c777 int hooknum, err = NF_ACCEPT; in ct_nat_execute() local
781 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in ct_nat_execute()
783 hooknum = NF_INET_LOCAL_OUT; /* Destination NAT */ in ct_nat_execute()
791 hooknum)) in ct_nat_execute()
804 hooknum, in ct_nat_execute()
823 : nf_nat_alloc_null_binding(ct, hooknum); in ct_nat_execute()
838 err = nf_nat_packet(ct, ctinfo, hooknum, skb); in ct_nat_execute()

12