net: provide default_advmss() methods to blackhole dst_ops
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 18 Feb 2011 19:39:01 +0000 (11:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Feb 2011 19:39:01 +0000 (11:39 -0800)
Commit 0dbaee3b37e118a (net: Abstract default ADVMSS behind an
accessor.) introduced a possible crash in tcp_connect_init(), when
dst->default_advmss() is called from dst_metric_advmss()

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c
net/ipv6/route.c

index 788a3e74834efdc0f56c96cb7b3be8e12048208b..6ed6603c2f6db41e5a73d4fe39d7489f0c560130 100644 (file)
@@ -2722,6 +2722,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
        .destroy                =       ipv4_dst_destroy,
        .check                  =       ipv4_blackhole_dst_check,
        .default_mtu            =       ipv4_blackhole_default_mtu,
+       .default_advmss         =       ipv4_default_advmss,
        .update_pmtu            =       ipv4_rt_blackhole_update_pmtu,
 };
 
index 1c29f95695de8eef82ad6711c9211a610fad1102..a998db6e78951ccf6dad683da74f8120e3479fda 100644 (file)
@@ -128,6 +128,7 @@ static struct dst_ops ip6_dst_blackhole_ops = {
        .destroy                =       ip6_dst_destroy,
        .check                  =       ip6_dst_check,
        .default_mtu            =       ip6_blackhole_default_mtu,
+       .default_advmss         =       ip6_default_advmss,
        .update_pmtu            =       ip6_rt_blackhole_update_pmtu,
 };