From owner-freebsd-net@freebsd.org Thu Sep 29 06:54:33 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E673AC00DFD for ; Thu, 29 Sep 2016 06:54:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFFA9AA8 for ; Thu, 29 Sep 2016 06:54:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id D99E36BD29; Thu, 29 Sep 2016 06:54:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: ICMPv6 HL Exceeded Messages Generated from Wrong Address To: Mark Kamichoff , freebsd-net@FreeBSD.org References: <20160929031108.GA1530@prolixium.com> From: "Andrey V. Elsukov" Message-ID: Date: Thu, 29 Sep 2016 09:52:20 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160929031108.GA1530@prolixium.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fTVH8HhSdOi87CuMGREr1tfUcsIQRXtqp" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 06:54:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fTVH8HhSdOi87CuMGREr1tfUcsIQRXtqp Content-Type: multipart/mixed; boundary="mA6wG8JahqUOrIwrIuERXX9sU7uOfh9s6"; protected-headers="v1" From: "Andrey V. Elsukov" To: Mark Kamichoff , freebsd-net@FreeBSD.org Message-ID: Subject: Re: ICMPv6 HL Exceeded Messages Generated from Wrong Address References: <20160929031108.GA1530@prolixium.com> In-Reply-To: <20160929031108.GA1530@prolixium.com> --mA6wG8JahqUOrIwrIuERXX9sU7uOfh9s6 Content-Type: multipart/mixed; boundary="------------6785C19945533E2812476ADF" This is a multi-part message in MIME format. --------------6785C19945533E2812476ADF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 29.09.2016 06:11, Mark Kamichoff wrote: > Hi -=20 >=20 > I've got FreeBSD 11* in a VM acting as an IPv6 router with a bunch of > tunnel interfaces and a couple virtio interfaces. I'm seeing some odd > behavior related to ICMPv6 HL exceeded messages (type 3 code 0) when > running traceroutes. Specifically, the FreeBSD box emits the ICMPv6 > messages using the outgoing interface address (ie, toward traceroute > destination) instead of the incoming interface address (expected). Hi, can you test this patch? --=20 WBR, Andrey V. Elsukov --------------6785C19945533E2812476ADF Content-Type: text/x-patch; name="icmp6.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="icmp6.c.diff" Index: icmp6.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- icmp6.c (revision 305970) +++ icmp6.c (working copy) @@ -2203,7 +2203,7 @@ icmp6_reflect(struct mbuf *m, size_t off) * that we do not own. Select a source address based on the * source address of the erroneous packet. */ - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); + in6_splitscope(&ip6->ip6_src, &dst6, &scopeid); error =3D in6_selectsrc_addr(RT_DEFAULT_FIB, &dst6, scopeid, NULL, &src6, &hlim); =20 --------------6785C19945533E2812476ADF-- --mA6wG8JahqUOrIwrIuERXX9sU7uOfh9s6-- --fTVH8HhSdOi87CuMGREr1tfUcsIQRXtqp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEsBAEBCAAWBQJX7LooDxxhZUBmcmVlYnNkLm9yZwAKCRABxeoEEMihegh1CACp /nFXv8meX+dGBMX9+SoDJbQZKFeO3MMBe0UCdIqrzuEZX8KloaceooeRh1q4h3Kw Qld96vQ8U5XPQ9V9wH/tS51hy6sKRknGSQ4SR0DiGwpHlJjDaWn1J/4cRKG9BilC Oid3eXdsmbYDMMZ2TugBPOf3iTPQZPfVW6tie/FQnUIKvYCP5U19XSj7gVgfbWVS BIdgRbuFLXAKariLIuQJsiMUxjoc2EF5T5BVTE3hk8MH9e2i2tHmgdyERF7PD3qz WqTA/ogv270DYYj4M6/cp5Bqg+9qsDNztLLLOfRw8ioGF0qrfWJOjFyZiZXJDvVR 74VAYKxTpvW029j2mt7v =P0ve -----END PGP SIGNATURE----- --fTVH8HhSdOi87CuMGREr1tfUcsIQRXtqp--