summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-27 07:21:53 -0200
committerRenato Botelho <renato@netgate.com>2015-11-27 07:21:53 -0200
commit0ae7a646d9336f5df6f1cdc6be849701027961e5 (patch)
tree3487fb25637ec11cfa8bfe7ac2d9cea6420e338c /sys/netipsec
parentbf1649eb466516d7552e66f436d03048429334c2 (diff)
parent11814c27fd3b1050198f173bafda29c66d0c79d3 (diff)
downloadFreeBSD-src-0ae7a646d9336f5df6f1cdc6be849701027961e5.zip
FreeBSD-src-0ae7a646d9336f5df6f1cdc6be849701027961e5.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index f01f0fe..bf02f93 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -1275,6 +1275,9 @@ ipsec46_in_reject(struct mbuf *m, struct inpcb *inp)
int error;
int result;
+ if (!key_havesp(IPSEC_DIR_INBOUND))
+ return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
/* Get SP for this packet. */
@@ -1402,6 +1405,9 @@ ipsec_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp)
int error;
size_t size;
+ if (!key_havesp(dir))
+ return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
/* Get SP for this packet. */
OpenPOWER on IntegriCloud