summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec_input.c
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <luiz@netgate.com>2015-09-15 15:37:13 -0500
committerLuiz Otavio O Souza <luiz@netgate.com>2015-10-20 12:03:00 -0500
commit20319db2373357495f7c1c01ad69af30684d8b36 (patch)
tree95f9adfe13b277bf864729ea7a304820b79fc9a2 /sys/netipsec/ipsec_input.c
parent2917c4bbfaa45cf1c60803a533b666734f1f5737 (diff)
downloadFreeBSD-src-20319db2373357495f7c1c01ad69af30684d8b36.zip
FreeBSD-src-20319db2373357495f7c1c01ad69af30684d8b36.tar.gz
MFC r282132:
Since PFIL can change mbuf pointer, we should update pointers after calling ipsec_filter(). Sponsored by: Yandex LLC TAG: IPSEC-HEAD Issue: #4841
Diffstat (limited to 'sys/netipsec/ipsec_input.c')
-rw-r--r--sys/netipsec/ipsec_input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index 845401b..fa37eb1 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -365,6 +365,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip,
ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE);
if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0)
return (error);
+ ip = mtod(m, struct ip *);
#endif /* DEV_ENC */
/* IP-in-IP encapsulation */
OpenPOWER on IntegriCloud