[Ns-developers] Possible bug

Ali Hamidian ali.hamidian at eit.lth.se
Thu Aug 28 05:01:38 PDT 2008


Hi,

I think there is a bug in ns-2, which can be solved in aodv.cc. In 
AODV::recv, generated packets add the size of an IP header: ch->size() 
+= IP_HDR_LEN. But if the generated packet is a TCP segment, the IP 
header has already been added in tcp.cc (tcpip_base_hdr_size_ = 40). So 
the bug will result in TCP packets being 20 B larger than they should 
be, i.e., first TCP will add 40 B for TCP and IP headers, and then AODV 
will add 20 B for IP header. Moreover, I remember from the past that 
this bug gives an error message when tcp-full.cc is used (e.g., by 
webcache). To solve this in an easy way, in aodv.cc we should add the IP 
header only if the packet is not PT_TCP or PT_ACK. See the attached file.

Kind regards,
Ali


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: aodvBugFix
Url: http://mailman.isi.edu/pipermail/ns-developers/attachments/20080828/f9da7162/aodvBugFix.ksh


More information about the Ns-developers mailing list