Wireless ad-hoc network is a set of independent mobile nodes that communicates through a wireless link. Due to open medium and lack of centralized authority, ad-hoc networks are susceptible to numerous routing attacks. A wormhole attack causes severe threat to ad hoc networks and disrupts the entire communication process. If the source node chooses the route which contains malicious node, then they have much high probability of packet dropping. In this paper, the authors propose Path Tracing (PT) algorithm for detection and prevention of wormhole attack as an extension of DSR protocol. The PT algorithm runs on each node in a path during the DSR route discovery process. It calculates per hop distance based on the RTT value and wormhole link using frequency appearance count.