Browse Source

BUG25629: set TCP_ACK flags on keepalive and zero window probes

STABLE-2_1_x
kieranm 17 years ago
parent
commit
84505d4cc8
  1. 3
      CHANGELOG
  2. 8
      src/core/tcp_out.c

3
CHANGELOG

@ -75,6 +75,9 @@ HISTORY
++ Bugfixes:
2009-03-26 Kieran Mansley
* tcp_out.c: set TCP_ACK flag on keepalive and zero window probes
2009-02-18 Simon Goldschmidt (Jonathan Larmour and Bill Auerbach)
* ip_frag.c: patch #6528: the buffer used for IP_FRAG_USES_STATIC_BUF could be
too small depending on MEM_ALIGNMENT

8
src/core/tcp_out.c

@ -830,8 +830,8 @@ tcp_keepalive(struct tcp_pcb *pcb)
tcphdr->dest = htons(pcb->remote_port);
tcphdr->seqno = htonl(pcb->snd_nxt - 1);
tcphdr->ackno = htonl(pcb->rcv_nxt);
TCPH_FLAGS_SET(tcphdr, 0);
tcphdr->wnd = htons(pcb->rcv_ann_wnd);
TCPH_FLAGS_SET(tcphdr, TCP_ACK);
tcphdr->wnd = htons(pcb->rcv_ann_wnd + 1);
tcphdr->urgp = 0;
TCPH_HDRLEN_SET(tcphdr, 5);
@ -913,8 +913,8 @@ tcp_zero_window_probe(struct tcp_pcb *pcb)
tcphdr->dest = htons(pcb->remote_port);
tcphdr->seqno = seg->tcphdr->seqno;
tcphdr->ackno = htonl(pcb->rcv_nxt);
TCPH_FLAGS_SET(tcphdr, 0);
tcphdr->wnd = htons(pcb->rcv_ann_wnd);
TCPH_FLAGS_SET(tcphdr, TCP_ACK);
tcphdr->wnd = htons(pcb->rcv_ann_wnd + 1);
tcphdr->urgp = 0;
TCPH_HDRLEN_SET(tcphdr, 5);

Loading…
Cancel
Save