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. Reported by Srinivas Gollakota with help of Oleg Tyshev.

This commit is contained in:
fbernon 2007-06-11 13:59:10 +00:00
parent 5993c816d8
commit 1d7caed340
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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);