]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/net/netfilter/nf_socket.h
Merge tag 'microblaze-4.15-rc2' of git://git.monstr.eu/linux-2.6-microblaze
[mirror_ubuntu-bionic-kernel.git] / include / net / netfilter / nf_socket.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _NF_SOCK_H_
3 #define _NF_SOCK_H_
4
5 struct net_device;
6 struct sk_buff;
7 struct sock;
8 struct net;
9
10 static inline bool nf_sk_is_transparent(struct sock *sk)
11 {
12 switch (sk->sk_state) {
13 case TCP_TIME_WAIT:
14 return inet_twsk(sk)->tw_transparent;
15 case TCP_NEW_SYN_RECV:
16 return inet_rsk(inet_reqsk(sk))->no_srccheck;
17 default:
18 return inet_sk(sk)->transparent;
19 }
20 }
21
22 struct sock *nf_sk_lookup_slow_v4(struct net *net, const struct sk_buff *skb,
23 const struct net_device *indev);
24
25 struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
26 const struct net_device *indev);
27
28 #endif