git: 4488a4f0486c - main - inpcb: make ipport_randomized static
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 19 Oct 2026 19:42:28 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=4488a4f0486c1c766f5e9498a524c379a5ad7add
commit 4488a4f0486c1c766f5e9498a524c379a5ad7add
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-10-19 19:41:58 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-10-19 19:42:15 +0000
inpcb: make ipport_randomized static
---
sys/netinet/in_pcb.c | 3 ++-
sys/netinet/in_pcb.h | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index c60042908b4c..d72fb4cce587 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -128,7 +128,8 @@ VNET_DEFINE(u_int, ipport_reservedhigh) = IPPORT_RESERVED - 1; /* 1023 */
VNET_DEFINE(u_int, ipport_reservedlow);
/* Enable random ephemeral port allocation by default. */
-VNET_DEFINE(bool, ipport_randomized) = true;
+VNET_DEFINE_STATIC(bool, ipport_randomized) = true;
+#define V_ipport_randomized VNET(ipport_randomized)
#ifdef INET
static struct inpcb *in_pcblookup_internal(struct inpcbinfo_ctx *ipictx,
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 614ba1507392..0d889feca7ed 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -603,7 +603,6 @@ VNET_DECLARE(u_int, ipport_firstauto);
VNET_DECLARE(u_int, ipport_lastauto);
VNET_DECLARE(u_int, ipport_hifirstauto);
VNET_DECLARE(u_int, ipport_hilastauto);
-VNET_DECLARE(bool, ipport_randomized);
#define V_ipport_reservedhigh VNET(ipport_reservedhigh)
#define V_ipport_reservedlow VNET(ipport_reservedlow)
@@ -613,7 +612,6 @@ VNET_DECLARE(bool, ipport_randomized);
#define V_ipport_lastauto VNET(ipport_lastauto)
#define V_ipport_hifirstauto VNET(ipport_hifirstauto)
#define V_ipport_hilastauto VNET(ipport_hilastauto)
-#define V_ipport_randomized VNET(ipport_randomized)
void in_pcbinfo_init(struct inpcbinfo *, struct inpcbstorage *,
u_int, u_int, u_int);