Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33083
b: refs/heads/master
c: 3687b1d
h: refs/heads/master
i:
  33081: ebb802c
  33079: c77854f
v: v3
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Aug 2, 2006
1 parent 68e3d6b commit 68cfad4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 118075b3cdc90e0815362365f3fc64d672ace0d6
refs/heads/master: 3687b1dc6fe83a500ba4d3235704594f6a111a2d
3 changes: 3 additions & 0 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,9 @@ static inline void tcp_set_state(struct sock *sk, int state)

static inline void tcp_done(struct sock *sk)
{
if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV)
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);

tcp_set_state(sk, TCP_CLOSE);
tcp_clear_xmit_timers(sk);

Expand Down
2 changes: 0 additions & 2 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ void tcp_v4_err(struct sk_buff *skb, u32 info)
It can f.e. if SYNs crossed.
*/
if (!sock_owned_by_user(sk)) {
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
sk->sk_err = err;

sk->sk_error_report(sk);
Expand Down Expand Up @@ -874,7 +873,6 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
drop_and_free:
reqsk_free(req);
drop:
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
return 0;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/net/ipv4/tcp_minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,10 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
/* RFC793: "second check the RST bit" and
* "fourth, check the SYN bit"
*/
if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN))
if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) {
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
goto embryonic_reset;
}

/* ACK sequence verified above, just make sure ACK is
* set. If ACK not set, just silently drop the packet.
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
case TCP_SYN_RECV: /* Cannot happen.
It can, it SYNs are crossed. --ANK */
if (!sock_owned_by_user(sk)) {
TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
sk->sk_err = err;
sk->sk_error_report(sk); /* Wake people up to see the error (see connect in sock.c) */

Expand Down Expand Up @@ -831,7 +830,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
if (req)
reqsk_free(req);

TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);
return 0; /* don't send reset */
}

Expand Down

0 comments on commit 68cfad4

Please sign in to comment.