This document provides an analysis of security issues and solutions for routing protocols in wireless sensor networks and wireless mesh networks. It discusses various threats and attacks at different layers of the OSI model, including jamming, man-in-the-middle attacks, and denial-of-service attacks at the physical layer. At higher layers, threats include selective forwarding, sinkhole attacks, and wormhole attacks. The document then outlines some solutions, such as intrusion prevention, intrusion detection systems, and key management techniques. It concludes by discussing prospects for improved security through techniques like elliptic curve cryptography and quantum cryptography.