net: tcp2: Don't instantiate an extra connection on SYN+ACK
On incoming SYN+ACK, use the existing TCP connection. This problem was overlooked earlier and was found while testing TCP2 client side. Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
parent
b0381bc80e
commit
4c81935c2e
1 changed files with 1 additions and 1 deletions
|
@ -917,7 +917,7 @@ static enum net_verdict tcp_recv(struct net_conn *net_conn,
|
||||||
|
|
||||||
th = th_get(pkt);
|
th = th_get(pkt);
|
||||||
|
|
||||||
if (th->th_flags & SYN) {
|
if (th->th_flags & SYN && !(th->th_flags & ACK)) {
|
||||||
struct tcp *conn_old = ((struct net_context *)user_data)->tcp;
|
struct tcp *conn_old = ((struct net_context *)user_data)->tcp;
|
||||||
|
|
||||||
conn = tcp_conn_new(pkt);
|
conn = tcp_conn_new(pkt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue