summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-06-26 14:12:35 +0000
committerbluhm <bluhm@openbsd.org>2017-06-26 14:12:35 +0000
commitcb785ef0c285e1dd8957e94aa20577e752ac9f9e (patch)
tree146f5dbbc3975c74192163cb21625f0886856bac /sys
parentwhen splitting a composite word, (diff)
downloadwireguard-openbsd-cb785ef0c285e1dd8957e94aa20577e752ac9f9e.tar.xz
wireguard-openbsd-cb785ef0c285e1dd8957e94aa20577e752ac9f9e.zip
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@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/icmp6.c6
1 files changed, 1 insertions, 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),