ipv4: tcp: get rid of ugly unicast_sock
In commitbe9f4a44e7
("ipv4: tcp: remove per net tcp_sock") I tried to address contention on a socket lock, but the solution I chose was horrible : commit3a7c384ffd
("ipv4: tcp: unicast_sock should not land outside of TCP stack") addressed a selinux regression. commit0980e56e50
("ipv4: tcp: set unicast_sock uc_ttl to -1") took care of another regression. commitb5ec8eeac4
("ipv4: fix ip_send_skb()") fixed another regression. commit811230cd85
("tcp: ipv4: initialize unicast_sock sk_pacing_rate") was another shot in the dark. Really, just use a proper socket per cpu, and remove the skb_orphan() call, to re-enable flow control. This solves a serious problem with FQ packet scheduler when used in hostile environments, as we do not want to allocate a flow structure for every RST packet sent in response to a spoofed packet. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0d32ef8cef
commit
bdbbb8527b
@@ -52,6 +52,7 @@ struct netns_ipv4 {
|
||||
struct inet_peer_base *peers;
|
||||
struct tcpm_hash_bucket *tcp_metrics_hash;
|
||||
unsigned int tcp_metrics_hash_log;
|
||||
struct sock * __percpu *tcp_sk;
|
||||
struct netns_frags frags;
|
||||
#ifdef CONFIG_NETFILTER
|
||||
struct xt_table *iptable_filter;
|
||||
|
Reference in New Issue
Block a user