Received: by mail.netbsd.org (Postfix, from userid 605) id 1458284E8C; Wed, 15 Apr 2020 14:27:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id EF7C784E81 for ; Wed, 15 Apr 2020 14:27:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Txb1hplg2baG for ; Wed, 15 Apr 2020 14:27:54 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 4FF9084D04 for ; Wed, 15 Apr 2020 14:27:54 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 48996FB27; Wed, 15 Apr 2020 14:27:54 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 15 Apr 2020 14:27:54 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-8] src/sys/netinet6 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200415142754.48996FB27@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Martin Husemann" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: martin Date: Wed Apr 15 14:27:54 UTC 2020 Modified Files: src/sys/netinet6 [netbsd-8]: nd6_rtr.c Log Message: Pull up following revision(s) (requested by kim in ticket #1531): sys/netinet6/nd6_rtr.c: revision 1.148 Fix default route selection The primary issue was that in revision 1.79 a check was added in the nd6_defrouter_select() search loop to ignore the entry if RA processing is enabled on its interface. In practice this results in all entries being ignored. This fix reverses the condition, so that an entry is ignored when RA processing is NOT enabled on its interface. Further, the entry is only ignored for being selected as the default router. The currently installed router must be identified regardless of the (current) status of its interface, so that we can delete the route before installing a new one. I also added error logging when adding or deleting a route fails. This should help the administrator (or kernel developer) in noticing possible problems. Finally, if deleting a route fails, the corresponding default route entry no longer has its "installed" flag cleared, so that deletion will be retried. At a minimum, this will cause repeated messages about the failed deletion as opposed to only getting repeated messages about the installation of a new default route failing. Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour observed with ndp(8). To generate a diff of this commit: cvs rdiff -u -r1.135.6.4 -r1.135.6.5 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.