> 
> On Aug 7, 2017, at 4:43 AM, Simonas Kazlauskas <simonas.kazlaus...@elgama.eu> 
> wrote:
> 
> So it seems like for some reason the pcb->snd_nxt is one-off.

This seems really strange.  For an active open, sending of the SYN packet 
advances pcb->snd_nxt by 1.  See the following code in tcp_output():

snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) {
  pcb->snd_nxt = snd_nxt;
}

In tcp_priv.h:

#define TCP_TCPLEN(seg) ((seg)->len + (((TCPH_FLAGS((seg)->tcphdr) & (TCP_FIN | 
TCP_SYN)) != 0) ? 1U : 0U))

Joel
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to