aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-04-21 04:52:38 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-04-21 04:53:42 +0000
commit7d222ce3c10bdc23c8dc92d6b13e376ede5840d5 (patch)
treea0d3fee715e77c07d376d06385184686459fcb09
parent8e491aaeac6eab92b1ba8f077f75cebac39adb1c (diff)
downloadsrc-7d222ce3c10bdc23c8dc92d6b13e376ede5840d5.tar.gz
src-7d222ce3c10bdc23c8dc92d6b13e376ede5840d5.zip
Fix NOINET[6],!VIMAGE builds after FIB_ALGO addition to GENERIC
Reported by: jbeich PR: 255390
-rw-r--r--sys/net/route/fib_algo.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/net/route/fib_algo.c b/sys/net/route/fib_algo.c
index 83fff1ec43e0..5dff2690454d 100644
--- a/sys/net/route/fib_algo.c
+++ b/sys/net/route/fib_algo.c
@@ -108,19 +108,19 @@ SYSCTL_NODE(_net_route, OID_AUTO, algo, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
/* Algorithm sync policy */
/* Time interval to bucket updates */
-VNET_DEFINE(unsigned int, bucket_time_ms) = 50;
-#define V_bucket_time_ms VNET(bucket_time_ms)
+VNET_DEFINE_STATIC(unsigned int, update_bucket_time_ms) = 50;
+#define V_update_bucket_time_ms VNET(update_bucket_time_ms)
SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_time_ms, CTLFLAG_RW | CTLFLAG_VNET,
- &VNET_NAME(bucket_time_ms), 0, "Time interval to calculate update rate");
+ &VNET_NAME(update_bucket_time_ms), 0, "Time interval to calculate update rate");
/* Minimum update rate to delay sync */
-VNET_DEFINE(unsigned int, bucket_change_threshold_rate) = 500;
+VNET_DEFINE_STATIC(unsigned int, bucket_change_threshold_rate) = 500;
#define V_bucket_change_threshold_rate VNET(bucket_change_threshold_rate)
SYSCTL_UINT(_net_route_algo, OID_AUTO, bucket_change_threshold_rate, CTLFLAG_RW | CTLFLAG_VNET,
&VNET_NAME(bucket_change_threshold_rate), 0, "Minimum update rate to delay sync");
/* Max allowed delay to sync */
-VNET_DEFINE(unsigned int, fib_max_sync_delay_ms) = 1000;
+VNET_DEFINE_STATIC(unsigned int, fib_max_sync_delay_ms) = 1000;
#define V_fib_max_sync_delay_ms VNET(fib_max_sync_delay_ms)
SYSCTL_UINT(_net_route_algo, OID_AUTO, fib_max_sync_delay_ms, CTLFLAG_RW | CTLFLAG_VNET,
&VNET_NAME(fib_max_sync_delay_ms), 0, "Maximum time to delay sync (ms)");
@@ -589,7 +589,7 @@ update_rebuild_delay(struct fib_data *fd, enum fib_callout_action action)
struct timeval tv;
/* Fetch all variables at once to ensure consistent reads */
- uint32_t bucket_time_ms = V_bucket_time_ms;
+ uint32_t bucket_time_ms = V_update_bucket_time_ms;
uint32_t threshold_rate = V_bucket_change_threshold_rate;
uint32_t max_delay_ms = V_fib_max_sync_delay_ms;
@@ -1618,10 +1618,14 @@ static struct fib_dp **
get_family_dp_ptr(int family)
{
switch (family) {
+#ifdef INET
case AF_INET:
return (&V_inet_dp);
+#endif
+#ifdef INET6
case AF_INET6:
return (&V_inet6_dp);
+#endif
}
return (NULL);
}