return;
}
+ /* Find the receiving interface */
TAILQ_FOREACH(ifp, ctx->ifaces, next) {
- if (ifp->active &&
- ifp->index == (unsigned int)pkt.ipi6_ifindex) {
- if (!(ifp->options->options & DHCPCD_IPV6))
- return;
+ if (ifp->index == (unsigned int)pkt.ipi6_ifindex)
break;
- }
}
+ /* Don't do anything if the user hasn't configured it. */
+ if (ifp != NULL &&
+ (ifp->active != IF_ACTIVE_USER ||
+ !(ifp->options->options & DHCPCD_IPV6)))
+ return;
+
icp = (struct icmp6_hdr *)ctx->rcvhdr.msg_iov[0].iov_base;
if (icp->icmp6_code == 0) {
switch(icp->icmp6_type) {