git: aa72c5bacb5f - main - dummymbuf: fix build without INET or INET6

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Tue, 20 Aug 2024 20:46:34 UTC
The branch main has been updated by glebius:

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

commit aa72c5bacb5f7ab359a3b7ae07b7c7b8705b60a8
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-08-20 20:45:38 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-08-20 20:45:38 +0000

    dummymbuf: fix build without INET or INET6
    
    Note that VIMAGE would mask both compilation failures.
---
 sys/net/dummymbuf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sys/net/dummymbuf.c b/sys/net/dummymbuf.c
index cb92889c5b77..8c46421888ed 100644
--- a/sys/net/dummymbuf.c
+++ b/sys/net/dummymbuf.c
@@ -117,11 +117,15 @@ SYSCTL_PROC(_net_dummymbuf, OID_AUTO, hits,
  * pfil(9) context
  */
 
+#ifdef INET
 VNET_DEFINE_STATIC(pfil_hook_t,		dmb_pfil_inet_hook);
 #define V_dmb_pfil_inet_hook		VNET(dmb_pfil_inet_hook)
+#endif
 
+#ifdef INET6
 VNET_DEFINE_STATIC(pfil_hook_t,		dmb_pfil_inet6_hook);
 #define V_dmb_pfil_inet6_hook		VNET(dmb_pfil_inet6_hook)
+#endif
 
 VNET_DEFINE_STATIC(pfil_hook_t,		dmb_pfil_ethernet_hook);
 #define V_dmb_pfil_ethernet_hook	VNET(dmb_pfil_ethernet_hook)
@@ -321,6 +325,7 @@ dmb_pfil_mbuf_chk(int pfil_type, struct mbuf **mp, struct ifnet *ifp,
 	return (PFIL_PASS);
 }
 
+#ifdef INET
 static pfil_return_t
 dmb_pfil_inet_mbuf_chk(struct mbuf **mp, struct ifnet *ifp, int flags,
     void *ruleset, struct inpcb *inp)
@@ -328,7 +333,9 @@ dmb_pfil_inet_mbuf_chk(struct mbuf **mp, struct ifnet *ifp, int flags,
 	return (dmb_pfil_mbuf_chk(PFIL_TYPE_IP4, mp, ifp, flags,
 	    ruleset, inp));
 }
+#endif
 
+#ifdef INET6
 static pfil_return_t
 dmb_pfil_inet6_mbuf_chk(struct mbuf **mp, struct ifnet *ifp, int flags,
     void *ruleset, struct inpcb *inp)
@@ -336,6 +343,7 @@ dmb_pfil_inet6_mbuf_chk(struct mbuf **mp, struct ifnet *ifp, int flags,
 	return (dmb_pfil_mbuf_chk(PFIL_TYPE_IP6, mp, ifp, flags,
 	    ruleset, inp));
 }
+#endif
 
 static pfil_return_t
 dmb_pfil_ethernet_mbuf_chk(struct mbuf **mp, struct ifnet *ifp, int flags,