projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tcp: should drop incoming frames without ACK flag set
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
net
/
ipv4
/
tcp_input.c
diff --git
a/net/ipv4/tcp_input.c
b/net/ipv4/tcp_input.c
index
a136925
..
a28e4db
100644
(file)
--- a/
net/ipv4/tcp_input.c
+++ b/
net/ipv4/tcp_input.c
@@
-5543,6
+5543,9
@@
slow_path:
if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
goto csum_error;
if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
goto csum_error;
+ if (!th->ack)
+ goto discard;
+
/*
* Standard slow path.
*/
/*
* Standard slow path.
*/
@@
-5551,7
+5554,7
@@
slow_path:
return 0;
step5:
return 0;
step5:
- if (t
h->ack && t
cp_ack(sk, skb, FLAG_SLOWPATH) < 0)
+ if (tcp_ack(sk, skb, FLAG_SLOWPATH) < 0)
goto discard;
/* ts_recent update must be made after we are sure that the packet
goto discard;
/* ts_recent update must be made after we are sure that the packet
@@
-5984,11
+5987,15
@@
int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
if (tcp_check_req(sk, skb, req, NULL, true) == NULL)
goto discard;
}
if (tcp_check_req(sk, skb, req, NULL, true) == NULL)
goto discard;
}
+
+ if (!th->ack)
+ goto discard;
+
if (!tcp_validate_incoming(sk, skb, th, 0))
return 0;
/* step 5: check the ACK field */
if (!tcp_validate_incoming(sk, skb, th, 0))
return 0;
/* step 5: check the ACK field */
- if (t
h->ack
) {
+ if (t
rue
) {
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH) > 0;
switch (sk->sk_state) {
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH) > 0;
switch (sk->sk_state) {
@@
-6138,8
+6145,7
@@
int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
}
break;
}
}
break;
}
- } else
- goto discard;
+ }
/* ts_recent update must be made after we are sure that the packet
* is in window.
/* ts_recent update must be made after we are sure that the packet
* is in window.