diff --git a/CHANGELOG b/CHANGELOG index cb58b380..d07be8af 100644 --- a/CHANGELOG +++ b/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 diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index c46e4b85..cf12a23c 100644 --- a/src/core/tcp_out.c +++ b/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);