]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: tcp: get rid of ugly unicast_sock
authorEric Dumazet <edumazet@google.com>
Fri, 30 Jan 2015 05:35:05 +0000 (21:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Feb 2015 07:06:19 +0000 (23:06 -0800)
commite16b8c0323a1fc2042e735ce809b60de1eefe4dd
treed3c764600d9d7a18956943fcb5c0de8f2e0a6c43
parentbe2735c3a46e8326e1325f558452a1abb3fb2c62
ipv4: tcp: get rid of ugly unicast_sock

In commit 79f76c5ee9e45 ("ipv4: tcp: remove per net tcp_sock")
I tried to address contention on a socket lock, but the solution
I chose was horrible :

commit e96e0d087037c ("ipv4: tcp: unicast_sock should not land outside
of TCP stack") addressed a selinux regression.

commit 95466a2d314f ("ipv4: tcp: set unicast_sock uc_ttl to -1")
took care of another regression.

commit e5b11f21e93 ("ipv4: fix ip_send_skb()") fixed another regression.

commit 45fbef593f ("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>
include/net/ip.h
include/net/netns/ipv4.h
net/ipv4/ip_output.c
net/ipv4/tcp_ipv4.c