[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] bugs and fixes in FullTcp & Eifel
Hi,
Here are several fixes for tcp-full.cc. These are quick hacks and
are not claimed to be complete (or even fully correct :) but they seem to
work.
1) Ignoring DUPACKs after RTO.
This is a nasty thing. If RTO happens during fast recovery and DUPACKs
arrive after that, they inflate cwnd and clock-out segment
retransmissions.
//AG fix to prevent fast recovery after RTO
if (cwnd_==1)
goto drop;
if (++dupacks_ == tcprexmtthresh_) {
2) CWR bug
The CWR bit ('A' flag) sometimes appears in FIN-ACK segment. This causes
the other side to ingore it and it is retransmitted forever.
/* ECT, ECN, and congestion action */
hdr_flags *fh = hdr_flags::access(p);
fh->ect() = ect_; // on after mutual agreement on ECT
if (ecn_ && !ect_) // initializing; ect = 0, ecnecho = 1
fh->ecnecho() = 1;
else {
fh->ecnecho() = recent_ce_;
}
if (ecn_) //AG
fh->cong_action() = cong_action_;
3) SYN drop bug
A sanity check in the code causes sometimes drop of a SYN segment with a
message 'Got packet lacking ACK'
// K: added TH_SYN, but it is already known here!
if ((tiflags & TH_ACK) == 0) {
fprintf(stderr, "%f: FullTcpAgent::recv(%s) got packet lacking ACK (seq %d)\n",
now(), name(), tcph->seqno());
// goto drop; AG: this kills SYNS!!
}
4) Reset of variables after closing of connection.
This has been already said on the list. Variables are not re-initialized
properly and the next TCP connection has problems.
if (ourfinisacked) {
newstate(TCPS_CLOSED);
#ifdef notdef
cancel_timers(); // DOES THIS BELONG HERE?, probably (see tcp_cose
#endif
finish();
reset(); //AG
goto drop;
5) Compile fix for Eifel algorithm.
This is a small fix for Morten Schl�ger tcp-eifel.cc in order to make it
compile properly in current NS release.
void EifelFullTcpAgent::pack_action(Packet *p){
// hdr_tcp *tcph = (hdr_tcp*)p->access(off_tcp_);
//AG: -> off_tcp_ -> p
hdr_tcp *tcph = hdr_tcp::access(p);
Andrei