Date: Sat, 16 Nov 2019 00:17:35 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354758 - head/sys/netinet6 Message-ID: <201911160017.xAG0HZDL091229@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911160017.xAG0HZDL091229>