diff options
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 1833c3f389ee..b1edf17bec01 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -90,6 +90,7 @@ struct inet_request_sock { | |||
90 | kmemcheck_bitfield_end(flags); | 90 | kmemcheck_bitfield_end(flags); |
91 | struct ip_options_rcu *opt; | 91 | struct ip_options_rcu *opt; |
92 | struct sk_buff *pktopts; | 92 | struct sk_buff *pktopts; |
93 | u32 ir_mark; | ||
93 | }; | 94 | }; |
94 | 95 | ||
95 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | 96 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) |
@@ -97,6 +98,15 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | |||
97 | return (struct inet_request_sock *)sk; | 98 | return (struct inet_request_sock *)sk; |
98 | } | 99 | } |
99 | 100 | ||
101 | static inline u32 inet_request_mark(struct sock *sk, struct sk_buff *skb) | ||
102 | { | ||
103 | if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept) { | ||
104 | return skb->mark; | ||
105 | } else { | ||
106 | return sk->sk_mark; | ||
107 | } | ||
108 | } | ||
109 | |||
100 | struct inet_cork { | 110 | struct inet_cork { |
101 | unsigned int flags; | 111 | unsigned int flags; |
102 | __be32 addr; | 112 | __be32 addr; |