aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-01 16:19:07 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-01 16:19:07 -0500
commit68d0c6d34d586a893292d4fb633a3bf8c547b222 (patch)
treeb6d812307621873cf16000171563c1f68b5bc255 /include
parent903ab86d195cca295379699299c5fc10beba31c7 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/net/ipv6.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 4a3cd2cd2f5e..1fc5631cf1a2 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -512,12 +512,17 @@ extern void ip6_flush_pending_frames(struct sock *sk);
512extern int ip6_dst_lookup(struct sock *sk, 512extern int ip6_dst_lookup(struct sock *sk,
513 struct dst_entry **dst, 513 struct dst_entry **dst,
514 struct flowi *fl); 514 struct flowi *fl);
515extern struct dst_entry * ip6_dst_lookup_flow(struct sock *sk,
516 struct flowi *fl,
517 const struct in6_addr *final_dst,
518 bool want_blackhole);
519extern struct dst_entry * ip6_sk_dst_lookup_flow(struct sock *sk,
520 struct flowi *fl,
521 const struct in6_addr *final_dst,
522 bool want_blackhole);
515extern int ip6_dst_blackhole(struct sock *sk, 523extern int ip6_dst_blackhole(struct sock *sk,
516 struct dst_entry **dst, 524 struct dst_entry **dst,
517 struct flowi *fl); 525 struct flowi *fl);
518extern int ip6_sk_dst_lookup(struct sock *sk,
519 struct dst_entry **dst,
520 struct flowi *fl);
521 526
522/* 527/*
523 * skb processing functions 528 * skb processing functions