Skip to content

Commit

Permalink
[SQUASH ME] add check for adding a parent to the FIB
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundogan committed Jul 21, 2015
1 parent d0c2bde commit 700f6b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sys/net/routing/ng_rpl/ng_rpl_dodag.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,13 @@ bool ng_rpl_parent_add_by_addr(ng_rpl_dodag_t *dodag, ng_ipv6_addr_t *addr, ng_r
DEBUG("RPL: no interface found for the parent addres\n");
return false;
}
fib_add_entry(if_id, def.u8, sizeof(ng_ipv6_addr_t), AF_INET6, dodag->parents->addr.u8,
if (fib_add_entry(if_id, def.u8, sizeof(ng_ipv6_addr_t), AF_INET6, dodag->parents->addr.u8,
sizeof(ng_ipv6_addr_t), AF_INET6,
(dodag->default_lifetime * dodag->lifetime_unit) * SEC_IN_MS);
(dodag->default_lifetime * dodag->lifetime_unit) * SEC_IN_MS) != 0) {
DEBUG("RPL: error adding parent to FIB\n");
ng_rpl_parent_remove(*parent);
return false;
}
}
return true;
}
Expand Down

0 comments on commit 700f6b5

Please sign in to comment.