Author: melifaro Date: Sun Nov 8 18:27:49 2020 New Revision: 367491 URL: https://svnweb.freebsd.org/changeset/base/367491
Log: Switch net.add_addr_allfibs default to 0. The goal of the fib support is to provide multiple independent routing tables, isolated from each other. net.add_addr_allfibs default tries to shift gears in the opposite direction, unconditionally inserting all addresses to all of the fibs. There are use cases when this is necessary, however this is not a default expected behaviour, especially compared to other implementations. Provide WARNING message for the setups with multiple fibs to notify potential users of the feature. Differential Revision: https://reviews.freebsd.org/D26076 Modified: head/UPDATING head/sys/net/route/route_ifaddrs.c head/sys/net/route/route_tables.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Nov 8 18:11:12 2020 (r367490) +++ head/UPDATING Sun Nov 8 18:27:49 2020 (r367491) @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20201108: + Default value of net.add_addr_allfibs has been changed to 0. + If you have multi-fib configuration and rely on existence of all + interface routes in every fib, you need to set the above sysctl to 1. 20201030: The internal pre-processor in the calendar(1) program has been extended to support more C pre-processor commands (e.g. #ifdef, #else, Modified: head/sys/net/route/route_ifaddrs.c ============================================================================== --- head/sys/net/route/route_ifaddrs.c Sun Nov 8 18:11:12 2020 (r367490) +++ head/sys/net/route/route_ifaddrs.c Sun Nov 8 18:27:49 2020 (r367491) @@ -61,7 +61,7 @@ * By default, interface address routes are added to the fib of the interface. * Once set to non-zero, adds interface address route to all fibs. */ -VNET_DEFINE(u_int, rt_add_addr_allfibs) = 1; +VNET_DEFINE(u_int, rt_add_addr_allfibs) = 0; SYSCTL_UINT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(rt_add_addr_allfibs), 0, ""); Modified: head/sys/net/route/route_tables.c ============================================================================== --- head/sys/net/route/route_tables.c Sun Nov 8 18:11:12 2020 (r367490) +++ head/sys/net/route/route_tables.c Sun Nov 8 18:27:49 2020 (r367491) @@ -183,6 +183,11 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); + if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) + printf("WARNING: Adding ifaddrs to all fibs has been turned off " + "by default. Consider tuning %s if needed\n", + "net.add_addr_allfibs"); + /* * Current rt_tables layout: * fib0[af0, af1, af2, .., AF_MAX]fib1[af0, af1, af2, .., Af_MAX].. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"