diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 6ef0d445b402..29dd3edf841e 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -2404,7 +2404,6 @@ icmp6_redirect_input(struct mbuf *m, int off) icmp6_redirect_diag(&src6, &reddst6, &redtgt6))); goto bad; } - /* validation passed */ icmp6len -= sizeof(*nd_rd); nd6_option_init(nd_rd + 1, icmp6len, &ndopts); @@ -2429,6 +2428,8 @@ icmp6_redirect_input(struct mbuf *m, int off) goto bad; } + /* Validation passed. */ + /* RFC 2461 8.3 */ nd6_cache_lladdr(ifp, &redtgt6, lladdr, lladdrlen, ND_REDIRECT, is_onlink ? ND_REDIRECT_ONLINK : ND_REDIRECT_ROUTER);