diff --git a/CHANGELOG b/CHANGELOG index f384f4c7..10d95331 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -196,6 +196,10 @@ HISTORY ++ Bug fixes: + 2007-06-11 Srinivas Gollakota & Oleg Tyshev + * tcp_out.c: Fix for bug #20075 : "A problem with keep-alive timer and TCP flags" + where TCP flags wasn't initialized in tcp_keepalive. + 2007-06-03 Simon Goldschmidt * udp.c: udp_input(): Input pbuf was not freed if pcb had no recv function registered, p->payload was modified without modifying p->len if sending diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 9bc23168..3de9a294 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -763,10 +763,11 @@ 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_wnd); tcphdr->urgp = 0; TCPH_HDRLEN_SET(tcphdr, 5); - + tcphdr->chksum = 0; #if CHECKSUM_GEN_TCP tcphdr->chksum = inet_chksum_pseudo(p, &pcb->local_ip, &pcb->remote_ip, IP_PROTO_TCP, p->tot_len);