summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2007-06-15 22:23:33 +0000
committerbz <bz@FreeBSD.org>2007-06-15 22:23:33 +0000
commit28982ea6eeb08b0bf51ee956c87c7329cceb508d (patch)
tree3988c4a0731e8b80bf1b84f8ae44679b3b8c411f /sys/netipsec
parenta3eda1cfc45efc2b862707c8014da7a7bf59c0e7 (diff)
downloadFreeBSD-src-28982ea6eeb08b0bf51ee956c87c7329cceb508d.zip
FreeBSD-src-28982ea6eeb08b0bf51ee956c87c7329cceb508d.tar.gz
Looking at {ah,esp}_input_cb it seems we might be able to end up
without an mtag in ipsec4_common_input_cb. So in case of !IPCOMP (AH,ESP) only change the m_tag_id if an mtag was passed to ipsec4_common_input_cb. Found with: Coverity Prevent(tm) CID: 2523
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index 3cd7f11..b98e1c8 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -445,7 +445,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar *sav,
tdbi->spi = sav->spi;
m_tag_prepend(m, mtag);
- } else {
+ } else if (mt != NULL) {
mt->m_tag_id = PACKET_TAG_IPSEC_IN_DONE;
/* XXX do we need to mark m_flags??? */
}
OpenPOWER on IntegriCloud