]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Get rid of inetpeer special cases.
authorDavid S. Miller <davem@davemloft.net>
Sat, 9 Jun 2012 08:25:47 +0000 (01:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Jun 2012 08:25:47 +0000 (01:25 -0700)
commit105dede9f70c1be529f8486bc873d1638ca6cf51
treeb8e90a8a449c0b42b77b54313683ab2d0edb09f3
parent9567d9a812a153d8b1fea1567e16a83eb08cae1e
tcp: Get rid of inetpeer special cases.

The get_peer method TCP uses is full of special cases that make no
sense accommodating, and it also gets in the way of doing more
reasonable things here.

First of all, if the socket doesn't have a usable cached route, there
is no sense in trying to optimize timewait recycling.

Likewise for the case where we have IP options, such as SRR enabled,
that make the IP header destination address (and thus the destination
address of the route key) differ from that of the connection's
destination address.

Just return a NULL peer in these cases, and thus we're also able to
get rid of the clumsy inetpeer release logic.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_connection_sock.h
include/net/tcp.h
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_minisocks.c
net/ipv6/tcp_ipv6.c