diff --git a/core/net/uaodv.c b/core/net/uaodv.c index eb90669c0..6577177fe 100644 --- a/core/net/uaodv.c +++ b/core/net/uaodv.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: uaodv.c,v 1.17 2007/05/09 13:54:41 bg- Exp $ + * $Id: uaodv.c,v 1.18 2007/05/09 14:53:54 bg- Exp $ */ /** @@ -268,13 +268,14 @@ handle_incoming_rreq(void) } /* Check if it is for our address or a fresh route. */ - if(uip_ipaddr_cmp(&rm->dest_addr, &uip_hostaddr)) { + if(uip_ipaddr_cmp(&rm->dest_addr, &uip_hostaddr) + || rm->flags & UAODV_RREQ_DESTONLY) { fw = NULL; } else { fw = uaodv_rt_lookup(&rm->dest_addr); if(!(rm->flags & UAODV_RREQ_UNKSEQNO) && fw != NULL - && SCMP32(ntohl(rm->dest_seqno), fw->hseqno) >= 0) { + && SCMP32(fw->hseqno, ntohl(rm->dest_seqno)) <= 0) { fw = NULL; } }