git: 9d7f17d7467e - main - icmp: hide icmp_bandlimit_uninit() under VIMAGE

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Sun, 24 Mar 2024 16:19:27 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=9d7f17d7467ed8c9740730a8db7a82e4768e5177

commit 9d7f17d7467ed8c9740730a8db7a82e4768e5177
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-03-24 16:13:23 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-03-24 16:13:23 +0000

    icmp: hide icmp_bandlimit_uninit() under VIMAGE
    
    The uninitialization may be executed only on a kernel with VIMAGE.
    
    Reviewed by:            kp, tuexen, zlei
    Differential Revision:  https://reviews.freebsd.org/D44476
---
 sys/netinet/ip_icmp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index c2aa1ded3266..fd9342831e43 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1116,6 +1116,7 @@ icmp_bandlimit_init(void)
 VNET_SYSINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY,
     icmp_bandlimit_init, NULL);
 
+#ifdef VIMAGE
 static void
 icmp_bandlimit_uninit(void)
 {
@@ -1125,6 +1126,7 @@ icmp_bandlimit_uninit(void)
 }
 VNET_SYSUNINIT(icmp_bandlimit, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD,
     icmp_bandlimit_uninit, NULL);
+#endif
 
 int
 badport_bandlim(int which)