diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-01 17:59:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-01 17:59:04 -0500 |
commit | 2774c131b1d19920b4587db1cfbd6f0750ad1f15 (patch) | |
tree | 3a0482c727cf4dcc046a211214f12459dcba8271 /include/net | |
parent | 69ead7afdf6028184f713a77376ee26f8aaafdcd (diff) |
xfrm: Handle blackhole route creation via afinfo.
That way we don't have to potentially do this in every xfrm_lookup()
caller.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dst.h | 8 | ||||
-rw-r--r-- | include/net/ipv6.h | 4 | ||||
-rw-r--r-- | include/net/route.h | 1 | ||||
-rw-r--r-- | include/net/xfrm.h | 1 |
4 files changed, 4 insertions, 10 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 15d67c8d3ce8..8948452132ad 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -432,17 +432,9 @@ static inline int xfrm_lookup(struct net *net, struct dst_entry **dst_p, | |||
432 | { | 432 | { |
433 | return 0; | 433 | return 0; |
434 | } | 434 | } |
435 | static inline int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, | ||
436 | const struct flowi *fl, struct sock *sk, | ||
437 | int flags) | ||
438 | { | ||
439 | return 0; | ||
440 | } | ||
441 | #else | 435 | #else |
442 | extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p, | 436 | extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p, |
443 | const struct flowi *fl, struct sock *sk, int flags); | 437 | const struct flowi *fl, struct sock *sk, int flags); |
444 | extern int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, | ||
445 | const struct flowi *fl, struct sock *sk, int flags); | ||
446 | #endif | 438 | #endif |
447 | #endif | 439 | #endif |
448 | 440 | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 5d125c1293a9..d6d077d7f2cf 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -520,8 +520,8 @@ extern struct dst_entry * ip6_sk_dst_lookup_flow(struct sock *sk, | |||
520 | struct flowi *fl, | 520 | struct flowi *fl, |
521 | const struct in6_addr *final_dst, | 521 | const struct in6_addr *final_dst, |
522 | bool can_sleep); | 522 | bool can_sleep); |
523 | extern struct dst_entry * ip6_dst_blackhole(struct net *net, | 523 | extern struct dst_entry * ip6_blackhole_route(struct net *net, |
524 | struct dst_entry *orig_dst); | 524 | struct dst_entry *orig_dst); |
525 | 525 | ||
526 | /* | 526 | /* |
527 | * skb processing functions | 527 | * skb processing functions |
diff --git a/include/net/route.h b/include/net/route.h index 923e670586d4..707cfc8eccdc 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -121,6 +121,7 @@ extern void rt_cache_flush_batch(struct net *net); | |||
121 | extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); | 121 | extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); |
122 | extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); | 122 | extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); |
123 | extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk); | 123 | extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk); |
124 | extern struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); | ||
124 | 125 | ||
125 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, | 126 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, |
126 | u8 tos, struct net_device *devin, bool noref); | 127 | u8 tos, struct net_device *devin, bool noref); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index efded23dc4ae..d5dcf3974636 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -280,6 +280,7 @@ struct xfrm_policy_afinfo { | |||
280 | int (*fill_dst)(struct xfrm_dst *xdst, | 280 | int (*fill_dst)(struct xfrm_dst *xdst, |
281 | struct net_device *dev, | 281 | struct net_device *dev, |
282 | const struct flowi *fl); | 282 | const struct flowi *fl); |
283 | struct dst_entry *(*blackhole_route)(struct net *net, struct dst_entry *orig); | ||
283 | }; | 284 | }; |
284 | 285 | ||
285 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); | 286 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); |