-/* $OpenBSD: ip_fil.c,v 1.11 1997/03/15 17:18:07 kstailey Exp $ */
+/* $OpenBSD: ip_fil.c,v 1.12 1997/03/31 15:52:45 kstailey Exp $ */
/*
* (C)opyright 1993,1994,1995 by Darren Reed.
*
};
#else /* _BSDI_VERSION >= 199501 */
+/* called by main() at boot time */
+void iplattach __P((int));
+
# ifdef IPFILTER_LOG
# if BSD >= 199306
int iplread __P((dev_t, struct uio *, int));
int iplclose __P((dev_t, int));
#endif /* _BSDI_VERSION >= 199501 */
-int iplattach __P((void));
-int ipldetach __P((void));
+int ipl_enable __P((void));
+int ipl_disable __P((void));
#ifdef IPFILTER_LKM
int iplidentify __P((char *));
void ipfr_fastroute __P((struct mbuf *, fr_info_t *, frdest_t *));
+/*
+ * None of the machinery should be initialized until the caller explicitly
+ * enables the filter with ipf -E.
+ */
+void
+iplattach(dummy)
+int dummy;
+{
+}
+
int
-iplattach()
+ipl_enable()
{
int s;
int
-ipldetach()
+ipl_disable()
{
int s, i = FR_INQUE|FR_OUTQUE;
else {
IRCOPY(data, (caddr_t)&enable, sizeof(enable));
if (enable)
- error = iplattach();
+ error = ipl_enable();
else
- error = ipldetach();
+ error = ipl_disable();
}
break;
}
void
iplinit()
{
- (void) iplattach();
+/* (void) ipl_enable(); must explicitly enable with ipf -E */
ip_init();
- (void) ipldetach(); /* XXX */
}
#endif