diff options
Diffstat (limited to 'include/net/inet_sock.h')
| -rw-r--r-- | include/net/inet_sock.h | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 8181498fa96c..7a37369f8ea3 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
| @@ -86,6 +86,19 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | |||
| 86 | return (struct inet_request_sock *)sk; | 86 | return (struct inet_request_sock *)sk; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | struct inet_cork { | ||
| 90 | unsigned int flags; | ||
| 91 | unsigned int fragsize; | ||
| 92 | struct ip_options *opt; | ||
| 93 | struct dst_entry *dst; | ||
| 94 | int length; /* Total length of all frames */ | ||
| 95 | __be32 addr; | ||
| 96 | struct flowi fl; | ||
| 97 | struct page *page; | ||
| 98 | u32 off; | ||
| 99 | u8 tx_flags; | ||
| 100 | }; | ||
| 101 | |||
| 89 | struct ip_mc_socklist; | 102 | struct ip_mc_socklist; |
| 90 | struct ipv6_pinfo; | 103 | struct ipv6_pinfo; |
| 91 | struct rtable; | 104 | struct rtable; |
| @@ -143,15 +156,7 @@ struct inet_sock { | |||
| 143 | int mc_index; | 156 | int mc_index; |
| 144 | __be32 mc_addr; | 157 | __be32 mc_addr; |
| 145 | struct ip_mc_socklist __rcu *mc_list; | 158 | struct ip_mc_socklist __rcu *mc_list; |
| 146 | struct { | 159 | struct inet_cork cork; |
| 147 | unsigned int flags; | ||
| 148 | unsigned int fragsize; | ||
| 149 | struct ip_options *opt; | ||
| 150 | struct dst_entry *dst; | ||
| 151 | int length; /* Total length of all frames */ | ||
| 152 | __be32 addr; | ||
| 153 | struct flowi fl; | ||
| 154 | } cork; | ||
| 155 | }; | 160 | }; |
| 156 | 161 | ||
| 157 | #define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */ | 162 | #define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */ |
| @@ -219,7 +224,13 @@ static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops | |||
| 219 | 224 | ||
| 220 | static inline __u8 inet_sk_flowi_flags(const struct sock *sk) | 225 | static inline __u8 inet_sk_flowi_flags(const struct sock *sk) |
| 221 | { | 226 | { |
| 222 | return inet_sk(sk)->transparent ? FLOWI_FLAG_ANYSRC : 0; | 227 | __u8 flags = 0; |
| 228 | |||
| 229 | if (inet_sk(sk)->transparent) | ||
| 230 | flags |= FLOWI_FLAG_ANYSRC; | ||
| 231 | if (sk->sk_protocol == IPPROTO_TCP) | ||
| 232 | flags |= FLOWI_FLAG_PRECOW_METRICS; | ||
| 233 | return flags; | ||
| 223 | } | 234 | } |
| 224 | 235 | ||
| 225 | #endif /* _INET_SOCK_H */ | 236 | #endif /* _INET_SOCK_H */ |
