ipv6: Consolidate route lookup sequences.
authorDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2011 21:19:07 +0000 (13:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2011 21:19:07 +0000 (13:19 -0800)
commit68d0c6d34d586a893292d4fb633a3bf8c547b222
treeb6d812307621873cf16000171563c1f68b5bc255
parent903ab86d195cca295379699299c5fc10beba31c7
ipv6: Consolidate route lookup sequences.

Route lookups follow a general pattern in the ipv6 code wherein
we first find the non-IPSEC route, potentially override the
flow destination address due to ipv6 options settings, and then
finally make an IPSEC search using either xfrm_lookup() or
__xfrm_lookup().

__xfrm_lookup() is used when we want to generate a blackhole route
if the key manager needs to resolve the IPSEC rules (in this case
-EREMOTE is returned and the original 'dst' is left unchanged).

Otherwise plain xfrm_lookup() is used and when asynchronous IPSEC
resolution is necessary, we simply fail the lookup completely.

All of these cases are encapsulated into two routines,
ip6_dst_lookup_flow and ip6_sk_dst_lookup_flow.  The latter of which
handles unconnected UDP datagram sockets.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipv6.h
net/dccp/ipv6.c
net/ipv6/af_inet6.c
net/ipv6/datagram.c
net/ipv6/inet6_connection_sock.c
net/ipv6/ip6_output.c
net/ipv6/raw.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c