diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-17 20:18:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-17 20:18:12 +0100 |
commit | 9f2dbdd9b11d40f5fe0749eb91cd1cfc86fde575 (patch) | |
tree | 9c5c365b44d7e6f4e7701d8235402b914ce25b79 /include/net/inet_sock.h | |
parent | bpf: allow BPF programs access 'protocol' and 'vlan_tci' fields (diff) | |
parent | tcp: uninline tcp_oow_rate_limited() (diff) | |
download | linux-9f2dbdd9b11d40f5fe0749eb91cd1cfc86fde575.tar.xz linux-9f2dbdd9b11d40f5fe0749eb91cd1cfc86fde575.zip |
Merge branch 'listener_refactor_part_11'
Eric Dumazet says:
====================
inet: tcp listener refactoring, part 11
Before inserting request sockets into general (ehash) table,
we need to prepare netfilter to cope with them, as they are
not full sockets.
I'll later change xt_socket to get full support, including for
request sockets (NEW_SYN_RECV)
Save 8 bytes in inet_request_sock on 64bit arches. We'll soon add
a pointer to the listener socket.
I included two TCP changes in this patch series.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 3d8c09abb097..c9ed91891887 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -94,11 +94,11 @@ struct inet_request_sock { acked : 1, no_srccheck: 1; kmemcheck_bitfield_end(flags); + u32 ir_mark; union { struct ip_options_rcu *opt; struct sk_buff *pktopts; }; - u32 ir_mark; }; static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) @@ -106,13 +106,12 @@ static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) return (struct inet_request_sock *)sk; } -static inline u32 inet_request_mark(struct sock *sk, struct sk_buff *skb) +static inline u32 inet_request_mark(const struct sock *sk, struct sk_buff *skb) { - if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept) { + if (!sk->sk_mark && sock_net(sk)->ipv4.sysctl_tcp_fwmark_accept) return skb->mark; - } else { - return sk->sk_mark; - } + + return sk->sk_mark; } struct inet_cork { |