diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-06-26 14:12:36 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-06-26 14:12:36 +0000 |
commit | e45e4be264c03a4622b9040ad53aa2fb8beb2eea (patch) | |
tree | a36aeaa0d0c9b699e3441871a3484eecf7f25dfb | |
parent | 1f7888a4adb2858dbe9d27a0464fce73c6a82f00 (diff) |
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@
-rw-r--r-- | sys/netinet6/icmp6.c | 6 |
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), |