[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug-report: tcp-full.cc
Hi,
The bug is found when we worked on our own customized
version of NS-2. I checked out the newest release (ns-2.1b6)
and found the bug is there too.
It is in ReassemblyQueue::add function, around line 2201
The code was:
// insert in the middle or end
n->next_ = p->next_;
p->next_ = n;
n->prev_ = p;
if (p == tail_)
tail_ = n;
It is obvious that the double link is broken here. Because the
p->next_->prev_ is still pointing to p, not n. To fix, only
need to add two lines:
// insert in the middle or end
n->next_ = p->next_;
if(p->next_)
p->next_->prev_= n;
p->next_ = n;
n->prev_ = p;
if (p == tail_)
tail_ = n;
The bug messed up the assembly queue when the holes in sequence
number is more than one at a certain time, though not common, it
happens as congestion is heavy.
For those who used version of NS-2 at our ftp site:
ftp://ftp-eng.cisco.com/ftp/kmn-group/ns-2/, we will
put the fix there too.
Thanks.
Li