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>
Showing
- include/net/ipv6.h 8 additions, 3 deletionsinclude/net/ipv6.h
- net/dccp/ipv6.c 20 additions, 45 deletionsnet/dccp/ipv6.c
- net/ipv6/af_inet6.c 5 additions, 12 deletionsnet/ipv6/af_inet6.c
- net/ipv6/datagram.c 4 additions, 11 deletionsnet/ipv6/datagram.c
- net/ipv6/inet6_connection_sock.c 6 additions, 19 deletionsnet/ipv6/inet6_connection_sock.c
- net/ipv6/ip6_output.c 69 additions, 11 deletionsnet/ipv6/ip6_output.c
- net/ipv6/raw.c 3 additions, 12 deletionsnet/ipv6/raw.c
- net/ipv6/syncookies.c 2 additions, 5 deletionsnet/ipv6/syncookies.c
- net/ipv6/tcp_ipv6.c 21 additions, 36 deletionsnet/ipv6/tcp_ipv6.c
- net/ipv6/udp.c 4 additions, 11 deletionsnet/ipv6/udp.c
Loading
Please register or sign in to comment