aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/route.h2
-rw-r--r--net/ipv4/tcp_ipv4.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net/route.h b/include/net/route.h
index ba0e0840370c..600d0f2ef8d6 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -292,7 +292,7 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable
292 292
293extern void rt_bind_peer(struct rtable *rt, int create); 293extern void rt_bind_peer(struct rtable *rt, int create);
294 294
295static inline struct inet_peer *rt_get_peer(struct rtable *rt) 295static inline struct inet_peer *rt_get_peer(struct rtable *rt, __be32 daddr)
296{ 296{
297 if (rt->peer) 297 if (rt->peer)
298 return rt->peer; 298 return rt->peer;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 7e0bc604ebd2..1d290acdcb27 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -206,7 +206,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
206 206
207 if (tcp_death_row.sysctl_tw_recycle && 207 if (tcp_death_row.sysctl_tw_recycle &&
208 !tp->rx_opt.ts_recent_stamp && fl4->daddr == daddr) { 208 !tp->rx_opt.ts_recent_stamp && fl4->daddr == daddr) {
209 struct inet_peer *peer = rt_get_peer(rt); 209 struct inet_peer *peer = rt_get_peer(rt, fl4->daddr);
210 /* 210 /*
211 * VJ's idea. We save last timestamp seen from 211 * VJ's idea. We save last timestamp seen from
212 * the destination in peer table, when entering state 212 * the destination in peer table, when entering state
@@ -1353,8 +1353,8 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
1353 if (tmp_opt.saw_tstamp && 1353 if (tmp_opt.saw_tstamp &&
1354 tcp_death_row.sysctl_tw_recycle && 1354 tcp_death_row.sysctl_tw_recycle &&
1355 (dst = inet_csk_route_req(sk, &fl4, req)) != NULL && 1355 (dst = inet_csk_route_req(sk, &fl4, req)) != NULL &&
1356 (peer = rt_get_peer((struct rtable *)dst)) != NULL && 1356 fl4.daddr == saddr &&
1357 peer->daddr.addr.a4 == saddr) { 1357 (peer = rt_get_peer((struct rtable *)dst, fl4.daddr)) != NULL) {
1358 inet_peer_refcheck(peer); 1358 inet_peer_refcheck(peer);
1359 if ((u32)get_seconds() - peer->tcp_ts_stamp < TCP_PAWS_MSL && 1359 if ((u32)get_seconds() - peer->tcp_ts_stamp < TCP_PAWS_MSL &&
1360 (s32)(peer->tcp_ts - req->ts_recent) > 1360 (s32)(peer->tcp_ts - req->ts_recent) >