* Respect "destination only" flag in RREQs.
* If our routes seqno is <= requester last known seqno our route must be bad (in his eyes). Previos comparison was < which must be wrong.
This commit is contained in:
parent
34490eeecb
commit
faf94db265
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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. */
|
/* 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;
|
fw = NULL;
|
||||||
} else {
|
} else {
|
||||||
fw = uaodv_rt_lookup(&rm->dest_addr);
|
fw = uaodv_rt_lookup(&rm->dest_addr);
|
||||||
if(!(rm->flags & UAODV_RREQ_UNKSEQNO)
|
if(!(rm->flags & UAODV_RREQ_UNKSEQNO)
|
||||||
&& fw != NULL
|
&& fw != NULL
|
||||||
&& SCMP32(ntohl(rm->dest_seqno), fw->hseqno) >= 0) {
|
&& SCMP32(fw->hseqno, ntohl(rm->dest_seqno)) <= 0) {
|
||||||
fw = NULL;
|
fw = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue