Skip to content

Commit

Permalink
fixup! shell_commands: adapt ping6 to original-ping-like implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Jul 9, 2018
1 parent 6d2bc0c commit 5dac3d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sys/shell/commands/sc_gnrc_icmpv6_echo.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include "msg.h"
#include "net/gnrc.h"
#include "net/gnrc/icmpv6.h"
#ifdef MODULE_GNRC_IPV6_NIB
#include "net/gnrc/ipv6/nib/nc.h"
#endif
#include "net/icmpv6.h"
#include "net/ipv6.h"
#include "timex.h"
Expand Down Expand Up @@ -385,6 +388,12 @@ static void _handle_reply(_ping_data_t *data, gnrc_pktsnip_t *pkt)
}
ipv6_hdr = ipv6->data;
_print_reply(data, icmpv6, &ipv6_hdr->src, ipv6_hdr->hl);
#ifdef MODULE_GNRC_IPV6_NIB
/* successful ping to neighbor (NIB handles case if ipv6->src is not a
* neighbor) can be taken as upper-layer hint for reachability:
* https://tools.ietf.org/html/rfc4861#section-7.3.1 */
gnrc_ipv6_nib_nc_mark_reachable(&ipv6_hdr->src);
#endif
}

static int _finish(_ping_data_t *data)
Expand Down

0 comments on commit 5dac3d3

Please sign in to comment.