summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorJianzhao Wang <jianzhao.wang@6wind.com>2010-09-08 14:35:43 -0700
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-01-06 18:08:15 -0500
commita8b0f3f80981d7c2ec1ee5add800da67143614eb (patch)
treead2034c302fbdc262b50c03b2db9f64543f4daaf /net/ipv4
parent5c30f6499e028123583a9558dacada798c7f1f07 (diff)
net: blackhole route should always be recalculated
commit ae2688d59b5f861dc70a091d003773975d2ae7fb upstream. Blackhole routes are used when xfrm_lookup() returns -EREMOTE (error triggered by IKE for example), hence this kind of route is always temporary and so we should check if a better route exists for next packets. Bug has been introduced by commit d11a4dc18bf41719c9f0d7ed494d295dd2973b92. Signed-off-by: Jianzhao Wang <jianzhao.wang@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index cb562fdd9b9..325b43c801b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2758,6 +2758,11 @@ slow_output:
EXPORT_SYMBOL_GPL(__ip_route_output_key);
+static struct dst_entry *ipv4_blackhole_dst_check(struct dst_entry *dst, u32 cookie)
+{
+ return NULL;
+}
+
static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu)
{
}
@@ -2766,7 +2771,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.destroy = ipv4_dst_destroy,
- .check = ipv4_dst_check,
+ .check = ipv4_blackhole_dst_check,
.update_pmtu = ipv4_rt_blackhole_update_pmtu,
.entries = ATOMIC_INIT(0),
};