diff options
author | James Morris <jmorris@namei.org> | 2007-03-04 19:12:44 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:23:32 -0400 |
commit | 9d729f72dca9406025bcfa9c1f660d71d9ef0ff5 (patch) | |
tree | 69a3ca50c6e266853676a545a113f13f254ae535 /net/ipv4/tcp_ipv4.c | |
parent | 39df232f1a9ba48d41c68ee7d4046756e709cf91 (diff) |
[NET]: Convert xtime.tv_sec to get_seconds()
Where appropriate, convert references to xtime.tv_sec to the
get_seconds() helper function.
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index f6793b4cc669..addac1110f94 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -149,7 +149,7 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp) | |||
149 | */ | 149 | */ |
150 | if (tcptw->tw_ts_recent_stamp && | 150 | if (tcptw->tw_ts_recent_stamp && |
151 | (twp == NULL || (sysctl_tcp_tw_reuse && | 151 | (twp == NULL || (sysctl_tcp_tw_reuse && |
152 | xtime.tv_sec - tcptw->tw_ts_recent_stamp > 1))) { | 152 | get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { |
153 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; | 153 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; |
154 | if (tp->write_seq == 0) | 154 | if (tp->write_seq == 0) |
155 | tp->write_seq = 1; | 155 | tp->write_seq = 1; |
@@ -224,7 +224,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
224 | * when trying new connection. | 224 | * when trying new connection. |
225 | */ | 225 | */ |
226 | if (peer != NULL && | 226 | if (peer != NULL && |
227 | peer->tcp_ts_stamp + TCP_PAWS_MSL >= xtime.tv_sec) { | 227 | peer->tcp_ts_stamp + TCP_PAWS_MSL >= get_seconds()) { |
228 | tp->rx_opt.ts_recent_stamp = peer->tcp_ts_stamp; | 228 | tp->rx_opt.ts_recent_stamp = peer->tcp_ts_stamp; |
229 | tp->rx_opt.ts_recent = peer->tcp_ts; | 229 | tp->rx_opt.ts_recent = peer->tcp_ts; |
230 | } | 230 | } |
@@ -1351,7 +1351,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1351 | (dst = inet_csk_route_req(sk, req)) != NULL && | 1351 | (dst = inet_csk_route_req(sk, req)) != NULL && |
1352 | (peer = rt_get_peer((struct rtable *)dst)) != NULL && | 1352 | (peer = rt_get_peer((struct rtable *)dst)) != NULL && |
1353 | peer->v4daddr == saddr) { | 1353 | peer->v4daddr == saddr) { |
1354 | if (xtime.tv_sec < peer->tcp_ts_stamp + TCP_PAWS_MSL && | 1354 | if (get_seconds() < peer->tcp_ts_stamp + TCP_PAWS_MSL && |
1355 | (s32)(peer->tcp_ts - req->ts_recent) > | 1355 | (s32)(peer->tcp_ts - req->ts_recent) > |
1356 | TCP_PAWS_WINDOW) { | 1356 | TCP_PAWS_WINDOW) { |
1357 | NET_INC_STATS_BH(LINUX_MIB_PAWSPASSIVEREJECTED); | 1357 | NET_INC_STATS_BH(LINUX_MIB_PAWSPASSIVEREJECTED); |
@@ -1770,7 +1770,7 @@ int tcp_v4_remember_stamp(struct sock *sk) | |||
1770 | 1770 | ||
1771 | if (peer) { | 1771 | if (peer) { |
1772 | if ((s32)(peer->tcp_ts - tp->rx_opt.ts_recent) <= 0 || | 1772 | if ((s32)(peer->tcp_ts - tp->rx_opt.ts_recent) <= 0 || |
1773 | (peer->tcp_ts_stamp + TCP_PAWS_MSL < xtime.tv_sec && | 1773 | (peer->tcp_ts_stamp + TCP_PAWS_MSL < get_seconds() && |
1774 | peer->tcp_ts_stamp <= tp->rx_opt.ts_recent_stamp)) { | 1774 | peer->tcp_ts_stamp <= tp->rx_opt.ts_recent_stamp)) { |
1775 | peer->tcp_ts_stamp = tp->rx_opt.ts_recent_stamp; | 1775 | peer->tcp_ts_stamp = tp->rx_opt.ts_recent_stamp; |
1776 | peer->tcp_ts = tp->rx_opt.ts_recent; | 1776 | peer->tcp_ts = tp->rx_opt.ts_recent; |
@@ -1791,7 +1791,7 @@ int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw) | |||
1791 | const struct tcp_timewait_sock *tcptw = tcp_twsk((struct sock *)tw); | 1791 | const struct tcp_timewait_sock *tcptw = tcp_twsk((struct sock *)tw); |
1792 | 1792 | ||
1793 | if ((s32)(peer->tcp_ts - tcptw->tw_ts_recent) <= 0 || | 1793 | if ((s32)(peer->tcp_ts - tcptw->tw_ts_recent) <= 0 || |
1794 | (peer->tcp_ts_stamp + TCP_PAWS_MSL < xtime.tv_sec && | 1794 | (peer->tcp_ts_stamp + TCP_PAWS_MSL < get_seconds() && |
1795 | peer->tcp_ts_stamp <= tcptw->tw_ts_recent_stamp)) { | 1795 | peer->tcp_ts_stamp <= tcptw->tw_ts_recent_stamp)) { |
1796 | peer->tcp_ts_stamp = tcptw->tw_ts_recent_stamp; | 1796 | peer->tcp_ts_stamp = tcptw->tw_ts_recent_stamp; |
1797 | peer->tcp_ts = tcptw->tw_ts_recent; | 1797 | peer->tcp_ts = tcptw->tw_ts_recent; |