From owner-freebsd-net@freebsd.org Mon Nov 6 04:40:02 2017 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 2EADEE59696 for ; Mon, 6 Nov 2017 04:40:02 +0000 (UTC) (envelope-from freebsd@dukhovni.org) Received: from mournblade.imrryr.org (mournblade.imrryr.org [108.5.242.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD0917C327 for ; Mon, 6 Nov 2017 04:40:01 +0000 (UTC) (envelope-from freebsd@dukhovni.org) Received: by mournblade.imrryr.org (Postfix, from userid 1034) id 67A427A3310; Mon, 6 Nov 2017 04:40:00 +0000 (UTC) Date: Mon, 6 Nov 2017 04:40:00 +0000 From: Viktor Dukhovni To: freebsd-net@freebsd.org Subject: Re: FreeBSD 11.1-RELEASE: Kernel panic in ipv6_output() via tcp6_usr_connect() Message-ID: <20171106044000.GM3322@mournblade.imrryr.org> Reply-To: freebsd-net@freebsd.org References: <86dcc06d-b98c-cc1f-8726-8afb011871e3@yandex.ru> <94e12e46-f54a-ae22-3f4c-0bd9ac7e1fc9@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94e12e46-f54a-ae22-3f4c-0bd9ac7e1fc9@yandex.ru> User-Agent: Mutt/1.7.2 (2016-11-26) 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: Mon, 06 Nov 2017 04:40:02 -0000 On Wed, Nov 01, 2017 at 02:17:33PM +0300, Andrey V. Elsukov wrote: > > # NAT the rest > > ipfw nat 1 config if "$oif" unreg_only reset same_ports > > ipfw add nat 1 ip from any to any via "$oif" > > Just an theory, can you try change this rule to be like this: > > ipfw add nat 1 ip4 from any to any via "$oif" > > From first glance I don't see any restrictions in libalias/nat44 to not > try to translate IPv6 packet assuming it as IPv4. I've changed the rule from "ip" to "ip4", but also made other changes to get 6to4 working, and no longer see panics. Reverting the rule on a running system back to "ip", still yields no panics, but I am now running a different 11.1 kernel built from SVN with my "stf" patch. So it is sadly not quite clear where the problem was, my original configuration, the older kernel, something else? # svn info Path: . Working Copy Root Path: /usr/src URL: https://svn0.us-west.freebsd.org/base/releng/11.1 Relative URL: ^/releng/11.1 Repository Root: https://svn0.us-west.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 325169 Node Kind: directory Schedule: normal Last Changed Author: gordon Last Changed Rev: 324708 Last Changed Date: 2017-10-17 17:20:07 -0400 (Tue, 17 Oct 2017) -- Viktor.