NS-2 Patches

All patches listed here have been tested with NS-2 2.28 and might be compatible with older and newer versions of NS-2. You can use them on your own risk. To apply a patch you have to enter

patch -p0 < patch.file

Link Description
DSDV Endless Loop Patch

Problem

DSDV hangs in an endless loop in processUpdate when it receives an routing table entry which already exists in the local routing table and the received entry rte has a lower sequence-number than the existing prte in the routing table. Furthermore, the destination of the existing entry is not reachable e. i. prte->metric == BIG and the new entry has got stale information of an old route to the destination. In the member function processUpdate of class DSDV_Agent queued packets are tried to send in a while loop to the destination after a new routing entry for that destination had been received. In order to the send the packet recv(p) is called which calls forwardPacket(p). The routing table still does not contain an entry with a prte->metric != BIG and therefore the packet is enqueued into the list again causing the while loop not to finish at all.

Solution

Do not rely on old routing information with lower sequence numbers than entries in the local routing table. To solve the problem the latest entry from the local routing table is taken. If this entry has a metric BIG it will not enque the packet later on again. The packets are forwarded calling forwardPacket instead of calling recv because this might end up in a bigger ip header since every time recv is called an ip header is added. Further information regarding the described problems can be found on the NS mailing list.