summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2007-07-19 09:57:54 +0000
committerbz <bz@FreeBSD.org>2007-07-19 09:57:54 +0000
commitee4925e857d632297a434e342a141e1c6ab67588 (patch)
treef8b2fb6e31f9bff5eb22dda7b159464e1960a99f /sys/netipsec
parente7080d27071c3286e207466cce32a1f0ed8f16ce (diff)
downloadFreeBSD-src-ee4925e857d632297a434e342a141e1c6ab67588.zip
FreeBSD-src-ee4925e857d632297a434e342a141e1c6ab67588.tar.gz
Replace hard coded options by their defined PFIL_{IN,OUT} names.
Approved by: re (hrs)
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec_input.c3
-rw-r--r--sys/netipsec/ipsec_output.c3
-rw-r--r--sys/netipsec/xform_ipip.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index b98e1c8..0e35a37 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -56,6 +56,7 @@
#include <sys/syslog.h>
#include <net/if.h>
+#include <net/pfil.h>
#include <net/route.h>
#include <net/netisr.h>
@@ -460,7 +461,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
ipsec_bpf(m, sav, AF_INET);
if (prot != IPPROTO_IPIP)
- if ((error = ipsec_filter(&m, 1)) != 0)
+ if ((error = ipsec_filter(&m, PFIL_IN)) != 0)
return (error);
#endif
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 7a1ec83..27ad224 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -44,6 +44,7 @@
#include <sys/syslog.h>
#include <net/if.h>
+#include <net/pfil.h>
#include <net/route.h>
#include <netinet/in.h>
@@ -362,7 +363,7 @@ ipsec4_process_packet(
#ifdef DEV_ENC
/* pass the mbuf to enc0 for packet filtering */
- if ((error = ipsec_filter(&m, 2)) != 0)
+ if ((error = ipsec_filter(&m, PFIL_OUT)) != 0)
goto bad;
#endif
diff --git a/sys/netipsec/xform_ipip.c b/sys/netipsec/xform_ipip.c
index ff7318e..80fafd2 100644
--- a/sys/netipsec/xform_ipip.c
+++ b/sys/netipsec/xform_ipip.c
@@ -52,6 +52,7 @@
#include <sys/sysctl.h>
#include <net/if.h>
+#include <net/pfil.h>
#include <net/route.h>
#include <net/netisr.h>
@@ -348,7 +349,7 @@ _ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp)
#ifdef DEV_ENC
/* pass the mbuf to enc0 for packet filtering */
- if (ipsec_filter(&m, 1) != 0)
+ if (ipsec_filter(&m, PFIL_IN) != 0)
return;
#endif
OpenPOWER on IntegriCloud