AODV: dynamic_cast<> replaced with check_and_cast<> in some cases.