From de4bfd6b9987987f82485e582beaa26338ed01d2 Mon Sep 17 00:00:00 2001 From: Reid Linnemann Date: Tue, 7 May 2024 16:46:35 -0600 Subject: [PATCH] udp_var: correct intoudpcb macro unintended identifier dependency Change 483fe9651 embedded struct inpcb into struct udpcb and updated the intoudpcb macro to use __containerof to locate it. This change accidentally introduced a dependency on the identifier inp being defined in the block the macro is expanded in. This should have been the macro argument ip. This change makes this simple correction. No functional change intended. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/udp_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index 0d70bad91df..2528e4fcb30 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -120,7 +120,7 @@ struct udpcb { void *u_tun_ctx; /* Tunneling callback context. */ }; -#define intoudpcb(ip) __containerof((inp), struct udpcb, u_inpcb) +#define intoudpcb(ip) __containerof((ip), struct udpcb, u_inpcb) #define sotoudpcb(so) (intoudpcb(sotoinpcb(so))) VNET_PCPUSTAT_DECLARE(struct udpstat, udpstat);