diff options
author | 2003-02-20 18:33:49 +0000 | |
---|---|---|
committer | 2003-02-20 18:33:49 +0000 | |
commit | 2a2c27074cbd1646225a9a61272828c594dd087a (patch) | |
tree | c1087c27f5a25d134edbce781a8f9f9d871b3832 /sys/netinet/ipsec_input.c | |
parent | no trailing newline in panic(); PR 3103 (diff) | |
download | wireguard-openbsd-2a2c27074cbd1646225a9a61272828c594dd087a.tar.xz wireguard-openbsd-2a2c27074cbd1646225a9a61272828c594dd087a.zip |
If there's no tag to be reset, don't reset it (avoids a NULL deref in the IPCOMP case)
Diffstat (limited to 'sys/netinet/ipsec_input.c')
-rw-r--r-- | sys/netinet/ipsec_input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index cf6cacb6785..b268be7b0ab 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.61 2002/06/28 19:07:03 angelos Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.62 2003/02/20 18:33:49 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -503,9 +503,10 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff, tdbi->spi = tdbp->tdb_spi; m_tag_prepend(m, mtag); + } else { + if (mt != NULL) + mt->m_tag_id = PACKET_TAG_IPSEC_IN_DONE; } - else - mt->m_tag_id = PACKET_TAG_IPSEC_IN_DONE; if (sproto == IPPROTO_ESP) { /* Packet is confidential ? */ |