[TCP]: 'dst' can be NULL in tcp_rto_min()

Reported by Rick Jones.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2007-08-31 14:39:44 -07:00
parent 88282c6ecf
commit 5c127c58ae

View File

@ -560,7 +560,7 @@ static u32 tcp_rto_min(struct sock *sk)
struct dst_entry *dst = __sk_dst_get(sk); struct dst_entry *dst = __sk_dst_get(sk);
u32 rto_min = TCP_RTO_MIN; u32 rto_min = TCP_RTO_MIN;
if (dst_metric_locked(dst, RTAX_RTO_MIN)) if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
rto_min = dst->metrics[RTAX_RTO_MIN-1]; rto_min = dst->metrics[RTAX_RTO_MIN-1];
return rto_min; return rto_min;
} }