git: fabc5e81bd04 - main - ipfilter: Remove dead code from "Virtualize ipfilter"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Nov 2024 22:01:00 UTC
The branch main has been updated by cy:
URL: https://cgit.FreeBSD.org/src/commit/?id=fabc5e81bd041d3e04ebab6e77c8271cbd57a009
commit fabc5e81bd041d3e04ebab6e77c8271cbd57a009
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-11-12 21:55:43 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-11-12 21:58:59 +0000
ipfilter: Remove dead code from "Virtualize ipfilter"
6d8a5eacae82 virtualized ipfilter for VNET. A few remnants of old
defunct code remained. Remove them. At the time it was not known if
6d8a5eacae82 would cause any issues. As it's been a number of years
since the conversion was done, it's certainly safe to remove the
dead code.
MFC after: 1 week
---
sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
index 47dbf017c0f4..aa0de6b8678a 100644
--- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
@@ -96,18 +96,6 @@ VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag);
VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag);
#define V_ipf_arrivetag VNET(ipf_arrivetag)
#define V_ipf_departtag VNET(ipf_departtag)
-#if 0
-/*
- * Disable the "cloner" event handler; we are getting interface
- * events before the firewall is fully initiallized and also no vnet
- * information thus leading to uninitialised memory accesses.
- * In addition it is unclear why we need it in first place.
- * If it turns out to be needed, well need a dedicated event handler
- * for it to deal with the ifc and the correct vnet.
- */
-VNET_DEFINE_STATIC(eventhandler_tag, ipf_clonetag);
-#define V_ipf_clonetag VNET(ipf_clonetag)
-#endif
static void ipf_ifevent(void *arg, struct ifnet *ifp);
@@ -1345,10 +1333,6 @@ ipf_event_reg(void)
V_ipf_departtag = EVENTHANDLER_REGISTER(ifnet_departure_event, \
ipf_ifevent, NULL, \
EVENTHANDLER_PRI_ANY);
-#if 0
- V_ipf_clonetag = EVENTHANDLER_REGISTER(if_clone_event, ipf_ifevent, \
- NULL, EVENTHANDLER_PRI_ANY);
-#endif
}
void
@@ -1360,11 +1344,6 @@ ipf_event_dereg(void)
if (V_ipf_departtag != NULL) {
EVENTHANDLER_DEREGISTER(ifnet_departure_event, V_ipf_departtag);
}
-#if 0
- if (V_ipf_clonetag != NULL) {
- EVENTHANDLER_DEREGISTER(if_clone_event, V_ipf_clonetag);
- }
-#endif
}