From owner-svn-src-head@freebsd.org Sat Nov 16 00:17:36 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1FB91B4950; Sat, 16 Nov 2019 00:17:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47FG4w5z80z425F; Sat, 16 Nov 2019 00:17:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D8A320F25; Sat, 16 Nov 2019 00:17:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAG0Ha1N091232; Sat, 16 Nov 2019 00:17:36 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAG0HZDL091229; Sat, 16 Nov 2019 00:17:35 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201911160017.xAG0HZDL091229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 16 Nov 2019 00:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354758 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 354758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2019 00:17:37 -0000 Author: bz Date: Sat Nov 16 00:17:35 2019 New Revision: 354758 URL: https://svnweb.freebsd.org/changeset/base/354758 Log: nd6: retire defrouter_select(), use _fib() variant. Burn bridges and replace the last two calls of defrouter_select() with defrouter_select_fib(). That allows us to retire defrouter_select() and make it more clear in the calling code that it applies to all FIBs. Sponsored by: Netflix Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sat Nov 16 00:02:36 2019 (r354757) +++ head/sys/netinet6/nd6.c Sat Nov 16 00:17:35 2019 (r354758) @@ -1746,7 +1746,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) case SIOCSNDFLUSH_IN6: /* XXX: the ioctl name is confusing... */ /* sync kernel routing table with the default router list */ defrouter_reset(); - defrouter_select(); + defrouter_select_fib(RT_ALL_FIBS); break; case SIOCSPFXFLUSH_IN6: { @@ -1786,7 +1786,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) defrouter_reset(); nd6_defrouter_flush_all(); - defrouter_select(); + defrouter_select_fib(RT_ALL_FIBS); break; } case SIOCGNBRINFO_IN6: Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Sat Nov 16 00:02:36 2019 (r354757) +++ head/sys/netinet6/nd6.h Sat Nov 16 00:17:35 2019 (r354758) @@ -405,7 +405,6 @@ struct nd_defrouter *defrouter_lookup(struct in6_addr struct nd_defrouter *defrouter_lookup_locked(struct in6_addr *, struct ifnet *); void defrouter_reset(void); void defrouter_select_fib(int fibnum); -void defrouter_select(void); void defrouter_rele(struct nd_defrouter *); bool defrouter_remove(struct in6_addr *, struct ifnet *); bool nd6_defrouter_list_empty(void); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Sat Nov 16 00:02:36 2019 (r354757) +++ head/sys/netinet6/nd6_rtr.c Sat Nov 16 00:17:35 2019 (r354758) @@ -988,16 +988,6 @@ defrouter_select_fib(int fibnum) } /* - * Maintain old KPI for default router selection. - * If unspecified, we can re-select routers for all FIBs. - */ -void -defrouter_select(void) -{ - defrouter_select_fib(RT_ALL_FIBS); -} - -/* * for default router selection * regards router-preference field as a 2-bit signed integer */