]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/net/netfilter/nf_socket.h
net/mlx5e: Rx, Fix checksum calculation for new hardware
[mirror_ubuntu-bionic-kernel.git] / include / net / netfilter / nf_socket.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
8db4c5be
PNA
2#ifndef _NF_SOCK_H_
3#define _NF_SOCK_H_
4
5struct net_device;
6struct sk_buff;
7struct sock;
8struct net;
9
10static 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
22struct sock *nf_sk_lookup_slow_v4(struct net *net, const struct sk_buff *skb,
23 const struct net_device *indev);
24
25struct sock *nf_sk_lookup_slow_v6(struct net *net, const struct sk_buff *skb,
26 const struct net_device *indev);
27
28#endif