summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-24 23:42:41 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-06-24 23:42:41 +0000
commit068ad287dc3f58ef1a615ed36d248072081330c8 (patch)
treec3fa3d29233abdc413dbc343d3567ca32d8b062a /sys
parent75e447d863f7a9d1456dd2cc81e117408f2b55b6 (diff)
make it compile w/o pf
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_input.c10
-rw-r--r--sys/netinet/ip_output.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index abe015b0fd7..f392a7dcf17 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.84 2001/06/24 19:48:58 kjell Exp $ */
+/* $OpenBSD: ip_input.c,v 1.85 2001/06/24 23:42:40 mickey Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -36,6 +36,8 @@
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
*/
+#include "pf.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -48,7 +50,10 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/route.h>
+
+#if NPF > 0
#include <net/pfvar.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -380,13 +385,14 @@ ipv4_input(m)
/*
* Packet filter
*/
+#if NPF > 0
{
struct mbuf *m1 = m;
if (pf_test(PF_IN, m->m_pkthdr.rcvif, &m1) != PF_PASS)
goto bad;
ip = mtod(m = m1, struct ip *);
}
-
+#endif
/*
* Process options and, if not destined for us,
* ship it on. ip_dooptions returns 1 when an
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index e1fadadcf73..cadf56cd8b2 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.118 2001/06/24 23:38:48 angelos Exp $ */
+/* $OpenBSD: ip_output.c,v 1.119 2001/06/24 23:42:40 mickey Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -36,6 +36,8 @@
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
*/
+#include "pf.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -47,7 +49,10 @@
#include <net/if.h>
#include <net/route.h>
+
+#if NPF > 0
#include <net/pfvar.h>
+#endif
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -634,13 +639,14 @@ sendit:
/*
* Packet filter
*/
+#if NPF > 0
{
struct mbuf *m1 = m;
if (pf_test(PF_OUT, ifp, &m1) != PF_PASS)
goto done;
ip = mtod(m = m1, struct ip *);
}
-
+#endif
/* Catch routing changes wrt. hardware checksumming for TCP or UDP. */
if (m->m_pkthdr.csum & M_TCPV4_CSUM_OUT &&
!(ifp->if_capabilities & IFCAP_CSUM_TCPv4)) {