Improvements to local repair and DAO handling.

This commit is contained in:
nvt-se 2010-05-24 16:38:56 +00:00
parent f882901bf6
commit c5d1c3ea27
4 changed files with 39 additions and 36 deletions

View file

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rpl-icmp6.c,v 1.8 2010/05/19 16:16:57 joxe Exp $
* $Id: rpl-icmp6.c,v 1.9 2010/05/24 16:38:56 nvt-se Exp $
*/
/**
* \file
@ -374,18 +374,19 @@ dao_input(void)
return;
}
PRINTF("RPL: Incoming DAO rank is %u, my rank is %u\n",
(unsigned)rank, (unsigned)dag->rank);
if(rank < dag->rank) {
PRINTF("RPL: Incoming DAO rank is %u, my rank is %u\n",
(unsigned)rank, (unsigned)dag->rank);
return;
}
PRINTF("RPL: DAO rank: %u, lifetime: %lu, prefix length: %u\n",
(unsigned)rank, (unsigned long)lifetime, (unsigned)prefixlen);
memset(&prefix, 0, sizeof(prefix));
memcpy(&prefix, buffer + pos, prefixlen / CHAR_BIT);
PRINTF("RPL: DAO rank: %u, lifetime: %lu, prefix length: %u",
(unsigned)rank, (unsigned long)lifetime, (unsigned)prefixlen);
PRINTF("\n");
if(lifetime == ZERO_LIFETIME) {
/* No-DAO received; invoke the route purging routine. */
rep = uip_ds6_route_lookup(&prefix);