[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question about TCPAgent reset()
On Tue, 25 Jan 2000, Guo, Liang wrote:
> However, since the ACK packet (acking packet 100) for the previous
> connection is still in flight, so as soon as $stcp starts, it
> will get this ACK packet and end the session, but it hasn't
> sent any packet out!
Surely the sequence number for that ack packet should (in most cases)
be beyond the right window of the new $stcp session, so $stcp should
simply ignore it?
Looking in:
void TcpAgent::newack(Packet* pkt)
[..]
hdr_tcp *tcph = hdr_tcp::access(pkt);
[..]
last_ack_ = tcph->seqno();
prev_highest_ack_ = highest_ack_ ;
highest_ack_ = last_ack_;
if (t_seqno_ < last_ack_ + 1)
t_seqno_ = last_ack_ + 1;
some sort of (untested conceptual suggestion; off the top of my head
from a quick browse) sanity check would be sensible here:
last_ack_ = tcph->seqno();
if (last_ack_ > maxseq_)
break; /* ack isn't acking anything we sent */
/* probably other ways to do it:
Got an int - TracedInt > TracedDouble here. ugh.
if (last_ack_ - highest_ack_ > cwnd_)
break;
*/
prev_highest_ack_ = highest_ack_ ;
highest_ack_ = last_ack_;
etc. This isn't quite Savage-et-al style defensiveness; just trying to
turn:
/*
* Process a packet that acks previously unacknowleged data.
*/
into
/*
* Process a packet that acks previously unacknowleged data
* that we think we sent.
*/
cheers,
L.
thinks tcp really should distinguish pkts for different 'conceptual'
tcp connections from the same 'physical' tcp agent object anyway.
<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>