summaryrefslogtreecommitdiffstats
path: root/sys/net/if_enc.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-17 13:52:58 -0300
committerRenato Botelho <renato@netgate.com>2015-08-17 13:52:58 -0300
commit5b128f054452e56b96564210c998510e0dd45130 (patch)
tree6f79ca547f337c0d9b9dc90822fa8e02e2641c2e /sys/net/if_enc.c
parent570dae5561e54cd2703f546b04a3fa029c92dc62 (diff)
downloadFreeBSD-src-5b128f054452e56b96564210c998510e0dd45130.zip
FreeBSD-src-5b128f054452e56b96564210c998510e0dd45130.tar.gz
Importing pfSense patch ipsec_altq.RELENG_10.diff
Diffstat (limited to 'sys/net/if_enc.c')
-rw-r--r--sys/net/if_enc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index dcb82f5..ea78088 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -52,6 +52,9 @@
#include <net/bpf.h>
#include <net/vnet.h>
+#include <altq/if_altq.h>
+#include <netpfil/pf/pf_mtag.h>
+
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
@@ -225,10 +228,11 @@ enc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
int
-ipsec_filter(struct mbuf **mp, int dir, int flags)
+ipsec_filter(struct mbuf **mp, struct secasindex *saidx, int dir, int flags)
{
int error, i;
struct ip *ip;
+ struct pf_mtag *atag;
KASSERT(encif != NULL, ("%s: encif is null", __func__));
KASSERT(flags & (ENC_IN|ENC_OUT),
@@ -297,6 +301,9 @@ ipsec_filter(struct mbuf **mp, int dir, int flags)
if (error != 0)
goto bad;
+ if (saidx && (atag = pf_find_mtag(*mp)) != NULL)
+ saidx->qid = atag->qid;
+
return (error);
bad:
OpenPOWER on IntegriCloud