From cb785ef0c285e1dd8957e94aa20577e752ac9f9e Mon Sep 17 00:00:00 2001 From: bluhm Date: Mon, 26 Jun 2017 14:12:35 +0000 Subject: [PATCH] When pinging an IPv6 link-local address, the reflected packet had ::1 as source address. It should be the link-local address of the attached interface. The rtalloc() in icmp6_reflect() did not find the correct local address. The IPv6 routing table does not use sin6_scope_id, but the embedded scope. So do not recover the scope. bug report Harald Dunkel; OK mpi@ --- sys/netinet6/icmp6.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index b3b2f5028c0..61facf80bcf 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.211 2017/05/30 12:09:27 friehm Exp $ */ +/* $OpenBSD: icmp6.c,v 1.212 2017/06/26 14:12:35 bluhm Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1117,14 +1117,10 @@ icmp6_reflect(struct mbuf *m, size_t off) sa6_src.sin6_family = AF_INET6; sa6_src.sin6_len = sizeof(sa6_src); sa6_src.sin6_addr = ip6->ip6_dst; - in6_recoverscope(&sa6_src, &ip6->ip6_dst); - in6_embedscope(&ip6->ip6_dst, &sa6_src, NULL); bzero(&sa6_dst, sizeof(sa6_dst)); sa6_dst.sin6_family = AF_INET6; sa6_dst.sin6_len = sizeof(sa6_dst); sa6_dst.sin6_addr = t; - in6_recoverscope(&sa6_dst, &t); - in6_embedscope(&t, &sa6_dst, NULL); /* * If the incoming packet was addressed directly to us (i.e. unicast), -- 2.20.1