Received: by mail.netbsd.org (Postfix, from userid 605) id 2632B84E62; Tue, 14 Apr 2020 17:26:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8B11D84E64 for ; Tue, 14 Apr 2020 17:26:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id VE7D8I59jY1v for ; Tue, 14 Apr 2020 17:26:23 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id BF53384DE1 for ; Tue, 14 Apr 2020 17:26:22 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id AE5FCFB27; Tue, 14 Apr 2020 17:26:22 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Tue, 14 Apr 2020 17:26:22 +0000 From: "Martin Husemann" Subject: CVS commit: [netbsd-9] src/sys/netinet6 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200414172622.AE5FCFB27@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: Tue Apr 14 17:26:22 UTC 2020 Modified Files: src/sys/netinet6 [netbsd-9]: nd6_rtr.c Log Message: Pull up following revision(s) (requested by kim in ticket #834): 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.145 -r1.145.2.1 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.