Skip to content

Commit

Permalink
fixup! gnrc_ndp_host: initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Sep 2, 2015
1 parent f76d89d commit 3fcf32f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys/net/gnrc/network_layer/ndp/gnrc_ndp.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ void gnrc_ndp_rtr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t
uint8_t l2src[GNRC_IPV6_NC_L2_ADDR_MAX];
int sicmpv6_size = (int)icmpv6_size, l2src_len = 0;
uint16_t opt_offset = 0;

assert(if_entry != NULL);
if (!ipv6_addr_is_link_local(&ipv6->src) ||
ipv6_addr_is_multicast(&ipv6->src) ||
Expand Down Expand Up @@ -331,6 +332,7 @@ void gnrc_ndp_rtr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t
(if_entry->reach_time_base != byteorder_ntohl(rtr_adv->reach_time))) {
/* calculate new random reachable time */
uint32_t reach_time = genrand_uint32_range(GNRC_NDP_MIN_RAND, GNRC_NDP_MAX_RAND);

if_entry->reach_time_base = byteorder_ntohl(rtr_adv->reach_time);
reach_time = (reach_time * if_entry->reach_time_base) / 10;
if_entry->reach_time = timex_set(0, reach_time);
Expand Down

0 comments on commit 3fcf32f

Please sign in to comment.