Skip to content

Commit

Permalink
Replace hard coded options by their defined PFIL_{IN,OUT} names.
Browse files Browse the repository at this point in the history
Approved by:	re (hrs)
  • Loading branch information
bz authored and bz committed Jul 19, 2007
1 parent e7080d2 commit ee4925e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sys/netipsec/ipsec_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <sys/syslog.h>

#include <net/if.h>
#include <net/pfil.h>
#include <net/route.h>
#include <net/netisr.h>

Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion sys/netipsec/ipsec_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <sys/syslog.h>

#include <net/if.h>
#include <net/pfil.h>
#include <net/route.h>

#include <netinet/in.h>
Expand Down Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion sys/netipsec/xform_ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <sys/sysctl.h>

#include <net/if.h>
#include <net/pfil.h>
#include <net/route.h>
#include <net/netisr.h>

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit ee4925e

Please sign in to comment.