mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-03 22:06:22 +00:00
* When looking up potentially bad routes use uaodv_rt_lookup_any
rather than uaodv_rt_lookup.
This commit is contained in:
parent
4601d620b9
commit
82aa4b4926
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uaodv-rt.c,v 1.5 2007/05/09 13:45:41 bg- Exp $
|
||||
* $Id: uaodv-rt.c,v 1.6 2007/05/09 16:45:53 bg- Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@ uaodv_rt_add(uip_ipaddr_t *dest, uip_ipaddr_t *nexthop,
|
||||
struct uaodv_rt_entry *e;
|
||||
|
||||
/* Avoid inserting duplicate entries. */
|
||||
e = uaodv_rt_lookup(dest);
|
||||
e = uaodv_rt_lookup_any(dest);
|
||||
if(e != NULL) {
|
||||
list_remove(route_table, e);
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: uaodv.c,v 1.18 2007/05/09 14:53:54 bg- Exp $
|
||||
* $Id: uaodv.c,v 1.19 2007/05/09 16:45:03 bg- Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -393,7 +393,7 @@ handle_incoming_rerr(void)
|
||||
if(uip_ipaddr_cmp(&rm->unreach[0].addr, &uip_hostaddr))
|
||||
return;
|
||||
|
||||
rt = uaodv_rt_lookup(&rm->unreach[0].addr);
|
||||
rt = uaodv_rt_lookup_any(&rm->unreach[0].addr);
|
||||
if(rt != NULL && uip_ipaddr_cmp(&rt->nexthop, uip_udp_sender())) {
|
||||
if(rm->flags & UAODV_RERR_UNKNOWN || rm->unreach[0].seqno == 0
|
||||
|| SCMP32(rt->hseqno, ntohl(rm->unreach[0].seqno)) <= 0) {
|
||||
@ -438,7 +438,7 @@ static u32_t bad_seqno; /* In network byte order! */
|
||||
void
|
||||
uaodv_bad_dest(uip_ipaddr_t *dest)
|
||||
{
|
||||
struct uaodv_rt_entry *rt = uaodv_rt_lookup(dest);
|
||||
struct uaodv_rt_entry *rt = uaodv_rt_lookup_any(dest);
|
||||
|
||||
if(rt == NULL)
|
||||
bad_seqno = 0; /* Or flag this in RERR? */
|
||||
|
Loading…
Reference in New Issue
Block a user