Skip to content

Commit

Permalink
[TCP]: 'dst' can be NULL in tcp_rto_min()
Browse files Browse the repository at this point in the history
Reported by Rick Jones.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 31, 2007
1 parent 88282c6 commit 5c127c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static u32 tcp_rto_min(struct sock *sk)
struct dst_entry *dst = __sk_dst_get(sk);
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];
return rto_min;
}
Expand Down

0 comments on commit 5c127c5

Please sign in to comment.