Replace hard coded options by their defined PFIL_{IN,OUT} names.

Approved by:	re (hrs)
This commit is contained in:
Bjoern A. Zeeb 2007-07-19 09:57:54 +00:00
parent 8accf26fea
commit b28cd33459
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171497
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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