From owner-freebsd-net@freebsd.org Wed Feb 8 18:25:33 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 6605DCD65EF for ; Wed, 8 Feb 2017 18:25:33 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:607c::16:b]) by mx1.freebsd.org (Postfix) with ESMTP id 25F299D6 for ; Wed, 8 Feb 2017 18:25:33 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id 90646376AE; Wed, 8 Feb 2017 18:25:32 +0000 (UTC) Date: Wed, 8 Feb 2017 18:25:32 +0000 To: freebsd-net@freebsd.org From: "asomers (Alan Somers)" Reply-to: D9451+325+eaa6f8a0c0731bfe@reviews.freebsd.org Subject: [Differential] D9451: Constrain IPv6 interface routes to each FIB Message-ID: <9a0e9dbf81e9f36e7db1a694bf3f217c@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , , Thread-Topic: D9451: Constrain IPv6 interface routes to each FIB X-Herald-Rules: <28>, <81> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: MzA4MmVhNjA3MDYxYjk1ZGE4NzFjZWJhMzgyIFibYpw= MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 18: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