Replace hard coded options by their defined PFIL_{IN,OUT} names.
Approved by: re (hrs)
This commit is contained in:
parent
8accf26fea
commit
b28cd33459
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user