Home
last modified time | relevance | path

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

123

/Linux-v6.1/net/netfilter/
Dcore.c267 nf_hook_entry_head(struct net *net, int pf, unsigned int hooknum, in nf_hook_entry_head() argument
275 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_arp) <= hooknum)) in nf_hook_entry_head()
277 return net->nf.hooks_arp + hooknum; in nf_hook_entry_head()
281 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_bridge) <= hooknum)) in nf_hook_entry_head()
283 return net->nf.hooks_bridge + hooknum; in nf_hook_entry_head()
287 if (WARN_ON_ONCE(hooknum != NF_INET_INGRESS)) in nf_hook_entry_head()
296 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv4) <= hooknum)) in nf_hook_entry_head()
298 return net->nf.hooks_ipv4 + hooknum; in nf_hook_entry_head()
300 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv6) <= hooknum)) in nf_hook_entry_head()
302 return net->nf.hooks_ipv6 + hooknum; in nf_hook_entry_head()
[all …]
Dnf_nat_redirect.c30 unsigned int hooknum) in nf_nat_redirect_ipv4() argument
37 WARN_ON(hooknum != NF_INET_PRE_ROUTING && in nf_nat_redirect_ipv4()
38 hooknum != NF_INET_LOCAL_OUT); in nf_nat_redirect_ipv4()
44 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv4()
82 unsigned int hooknum) in nf_nat_redirect_ipv6() argument
90 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv6()
Dnfnetlink_hook.c123 u32 hooknum; in nfnl_hook_dump_one() local
161 if (ops->pf == NFPROTO_INET && ops->hooknum == NF_INET_INGRESS) in nfnl_hook_dump_one()
162 hooknum = NF_NETDEV_INGRESS; in nfnl_hook_dump_one()
164 hooknum = ops->hooknum; in nfnl_hook_dump_one()
166 ret = nla_put_be32(nlskb, NFNLA_HOOK_HOOKNUM, htonl(hooknum)); in nfnl_hook_dump_one()
297 u32 hooknum; in nfnl_hook_dump_start() local
299 hooknum = ntohl(nla_get_be32(nla[NFNLA_HOOK_HOOKNUM])); in nfnl_hook_dump_start()
300 if (hooknum > 255) in nfnl_hook_dump_start()
312 head = nfnl_hook_entries_head(family, hooknum, net, name); in nfnl_hook_dump_start()
324 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_log_syslog.c111 unsigned int hooknum, const struct sk_buff *skb, in nf_log_dump_packet_common() argument
134 unsigned int hooknum, const struct sk_buff *skb, in nf_log_arp_packet() argument
150 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, loginfo, in nf_log_arp_packet()
831 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip_packet() argument
847 nf_log_dump_packet_common(m, pf, hooknum, skb, in, in nf_log_ip_packet()
866 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip6_packet() argument
882 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, in nf_log_ip6_packet()
901 unsigned int hooknum, in nf_log_unknown_packet() argument
918 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, loginfo, in nf_log_unknown_packet()
927 unsigned int hooknum, in nf_log_netdev_packet() argument
[all …]
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()
997 unsigned int hooknum = ops->hooknum; in nf_nat_register_fn() local
1007 if (orig_nat_ops[i].hooknum == hooknum) { in nf_nat_register_fn()
1008 hooknum = i; in nf_nat_register_fn()
1052 priv = nat_ops[hooknum].priv; in nf_nat_register_fn()
1073 int hooknum = ops->hooknum; in nf_nat_unregister_fn() local
1089 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_conntrack_proto.c223 .hooknum = NF_INET_PRE_ROUTING,
229 .hooknum = NF_INET_LOCAL_OUT,
235 .hooknum = NF_INET_POST_ROUTING,
241 .hooknum = NF_INET_LOCAL_IN,
421 .hooknum = NF_INET_PRE_ROUTING,
427 .hooknum = NF_INET_LOCAL_OUT,
433 .hooknum = NF_INET_POST_ROUTING,
439 .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(net->nf.hooks_bridge[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()
/Linux-v6.1/include/net/netfilter/
Dnf_nat.h19 #define HOOK2MANIP(hooknum) ((hooknum) != NF_INET_POST_ROUTING && \ argument
20 (hooknum) != NF_INET_LOCAL_IN)
44 unsigned int hooknum);
57 static inline bool nf_nat_oif_changed(unsigned int hooknum, in nf_nat_oif_changed() argument
63 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && in nf_nat_oif_changed()
77 unsigned int hooknum, struct sk_buff *skb);
88 unsigned int hooknum);
92 unsigned int hooknum, unsigned int hdrlen);
Dnf_nat_redirect.h11 unsigned int hooknum);
14 unsigned int hooknum);
Dnf_log.h41 unsigned int hooknum,
79 unsigned int hooknum,
89 unsigned int hooknum,
/Linux-v6.1/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 …]
/Linux-v6.1/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.c38 .hooknum = NF_INET_PRE_ROUTING,
44 .hooknum = NF_INET_POST_ROUTING,
50 .hooknum = NF_INET_LOCAL_OUT,
56 .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()
/Linux-v6.1/net/ipv4/netfilter/
Diptable_nat.c36 .hooknum = NF_INET_PRE_ROUTING,
42 .hooknum = NF_INET_POST_ROUTING,
48 .hooknum = NF_INET_LOCAL_OUT,
54 .hooknum = NF_INET_LOCAL_IN,
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,
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()
/Linux-v6.1/net/bridge/netfilter/
Debtable_filter.c57 .hooknum = NF_BR_LOCAL_IN,
63 .hooknum = NF_BR_FORWARD,
69 .hooknum = NF_BR_LOCAL_OUT,
Debtable_nat.c57 .hooknum = NF_BR_LOCAL_OUT,
63 .hooknum = NF_BR_POST_ROUTING,
69 .hooknum = NF_BR_PRE_ROUTING,
/Linux-v6.1/security/smack/
Dsmack_netfilter.c42 .hooknum = NF_INET_LOCAL_OUT,
49 .hooknum = NF_INET_LOCAL_OUT,
/Linux-v6.1/include/net/netfilter/ipv4/
Dnf_dup_ipv4.h8 void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
/Linux-v6.1/include/net/netfilter/ipv6/
Dnf_dup_ipv6.h7 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,

123