This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RedBoot sends continuous ACKS in TIME_WAIT state.


>>>>> Grant Edwards writes:

>> Based on comparisons to the same sequence of events when an
>> eCos server-app does an active close, the problem appears to be
>> that the sequence number in the ACKs sent by RedBoot in frames
>> 11, 13, 15 should be 12 instead of 11.  One of the states in
>> the active close sequence isn't advancing the local sequence
>> number when it receives an ACK. I'm not sure which one should
>> be doing it.

> RedBoot wasn't incrementing the sequence number for the FIN
> that it sends when doing an active close.  (SYN and FIN both
> use up a sequence number.) I've attached a patch for tcp.c to
> fix the problem (only seen when RedBoot does an active close).

Yes, thanks. I will apply this to the repository. Also, I am
including the following patch to prevent the spurious ACKs.

--Mark


Index: tcp.c
===================================================================
RCS file: /home/cvs/ecc/ecc/redboot/current/src/net/tcp.c,v
retrieving revision 1.5
diff -u -p -5 -c -r1.5 tcp.c
cvs server: conflicting specifications of output style
*** tcp.c	2001/01/18 20:04:22	1.5
--- tcp.c	2001/03/27 19:25:39
*************** __tcp_handler(pktbuf_t *pkt, ip_route_t 
*** 546,556 ****
  		}
  		break;
  
  	      case _TIME_WAIT:
  		BSPLOG(bsp_log("_TIME_WAIT resend.\n"));
! 		tcp_send(s, 0, 1); /* just resend ack */
  		break;
  	    }
  	} else {
  	    BSPLOG(bsp_log("Unexpected segment from: %d.%d.%d.%d:%d\n",
  			   r->ip_addr[0], r->ip_addr[1], r->ip_addr[3],
--- 546,557 ----
  		}
  		break;
  
  	      case _TIME_WAIT:
  		BSPLOG(bsp_log("_TIME_WAIT resend.\n"));
! 		if (tcp->flags & TCP_FLAG_FIN)
! 		    tcp_send(s, 0, 1); /* just resend ack */
  		break;
  	    }
  	} else {
  	    BSPLOG(bsp_log("Unexpected segment from: %d.%d.%d.%d:%d\n",
  			   r->ip_addr[0], r->ip_addr[1], r->ip_addr[3],


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]