Index: sbin/ping/ping6.c =================================================================== --- sbin/ping/ping6.c +++ sbin/ping/ping6.c @@ -1064,8 +1064,13 @@ } /* Save pktinfo in the ancillary data. */ - if (usepktinfo) + if (usepktinfo) { memcpy(cmsg_pktinfo, &pktinfo, sizeof(pktinfo)); + if (dst.sin6_scope_id == 0 && + setsockopt(ssend, IPPROTO_IPV6, IPV6_PKTINFO, + (void *)&pktinfo, sizeof(pktinfo)) < 0) + warn("setsockopt(IPV6_PKTINFO)"); + } if (connect(ssend, (struct sockaddr *)&dst, sizeof(dst)) != 0) err(1, "connect() ssend");