diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 69f9cf684744..9ff311cf00f3 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -122,7 +122,7 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp) | |||
122 | and use initial timestamp retrieved from peer table. | 122 | and use initial timestamp retrieved from peer table. |
123 | */ | 123 | */ |
124 | if (tcptw->tw_ts_recent_stamp && | 124 | if (tcptw->tw_ts_recent_stamp && |
125 | (twp == NULL || (sysctl_tcp_tw_reuse && | 125 | (!twp || (sysctl_tcp_tw_reuse && |
126 | get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { | 126 | get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { |
127 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; | 127 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; |
128 | if (tp->write_seq == 0) | 128 | if (tp->write_seq == 0) |
@@ -494,7 +494,7 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) | |||
494 | /* Only in fast or simultaneous open. If a fast open socket is | 494 | /* Only in fast or simultaneous open. If a fast open socket is |
495 | * is already accepted it is treated as a connected one below. | 495 | * is already accepted it is treated as a connected one below. |
496 | */ | 496 | */ |
497 | if (fastopen && fastopen->sk == NULL) | 497 | if (fastopen && !fastopen->sk) |
498 | break; | 498 | break; |
499 | 499 | ||
500 | if (!sock_owned_by_user(sk)) { | 500 | if (!sock_owned_by_user(sk)) { |
@@ -1390,7 +1390,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
1390 | sk_mark_napi_id(sk, skb); | 1390 | sk_mark_napi_id(sk, skb); |
1391 | if (dst) { | 1391 | if (dst) { |
1392 | if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif || | 1392 | if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif || |
1393 | dst->ops->check(dst, 0) == NULL) { | 1393 | !dst->ops->check(dst, 0)) { |
1394 | dst_release(dst); | 1394 | dst_release(dst); |
1395 | sk->sk_rx_dst = NULL; | 1395 | sk->sk_rx_dst = NULL; |
1396 | } | 1396 | } |