mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-16 14:07:36 +00:00
Merge pull request #1303 from oliverschmidt/master
Initialize acknowledgment no. on establishment of outgoing TCP connection.
This commit is contained in:
commit
6b29e4b30d
@ -436,6 +436,11 @@ uip_connect(const uip_ipaddr_t *ripaddr, uint16_t rport)
|
||||
conn->snd_nxt[2] = iss[2];
|
||||
conn->snd_nxt[3] = iss[3];
|
||||
|
||||
conn->rcv_nxt[0] = 0;
|
||||
conn->rcv_nxt[1] = 0;
|
||||
conn->rcv_nxt[2] = 0;
|
||||
conn->rcv_nxt[3] = 0;
|
||||
|
||||
conn->initialmss = conn->mss = UIP_TCP_MSS;
|
||||
|
||||
conn->len = 1; /* TCP length of the SYN is one. */
|
||||
@ -1367,10 +1372,10 @@ uip_process(uint8_t flag)
|
||||
uip_connr->len = 1;
|
||||
|
||||
/* rcv_nxt should be the seqno from the incoming packet + 1. */
|
||||
uip_connr->rcv_nxt[3] = BUF->seqno[3];
|
||||
uip_connr->rcv_nxt[2] = BUF->seqno[2];
|
||||
uip_connr->rcv_nxt[1] = BUF->seqno[1];
|
||||
uip_connr->rcv_nxt[0] = BUF->seqno[0];
|
||||
uip_connr->rcv_nxt[1] = BUF->seqno[1];
|
||||
uip_connr->rcv_nxt[2] = BUF->seqno[2];
|
||||
uip_connr->rcv_nxt[3] = BUF->seqno[3];
|
||||
uip_add_rcv_nxt(1);
|
||||
|
||||
/* Parse the TCP MSS option, if present. */
|
||||
|
@ -1745,10 +1745,10 @@ uip_process(uint8_t flag)
|
||||
uip_connr->len = 1;
|
||||
|
||||
/* rcv_nxt should be the seqno from the incoming packet + 1. */
|
||||
uip_connr->rcv_nxt[3] = UIP_TCP_BUF->seqno[3];
|
||||
uip_connr->rcv_nxt[2] = UIP_TCP_BUF->seqno[2];
|
||||
uip_connr->rcv_nxt[1] = UIP_TCP_BUF->seqno[1];
|
||||
uip_connr->rcv_nxt[0] = UIP_TCP_BUF->seqno[0];
|
||||
uip_connr->rcv_nxt[1] = UIP_TCP_BUF->seqno[1];
|
||||
uip_connr->rcv_nxt[2] = UIP_TCP_BUF->seqno[2];
|
||||
uip_connr->rcv_nxt[3] = UIP_TCP_BUF->seqno[3];
|
||||
uip_add_rcv_nxt(1);
|
||||
|
||||
/* Parse the TCP MSS option, if present. */
|
||||
|
Loading…
Reference in New Issue
Block a user