diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ipsec_input.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c index 13370a297be..792ebf5c337 100644 --- a/sys/netinet/ipsec_input.c +++ b/sys/netinet/ipsec_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_input.c,v 1.85 2007/12/14 18:33:41 deraadt Exp $ */ +/* $OpenBSD: ipsec_input.c,v 1.86 2008/06/11 17:39:51 canacar Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -412,7 +412,7 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff, #ifdef INET6 /* Fix IPv6 header */ - if (af == INET6) + if (af == AF_INET6) { if (m->m_len < sizeof(struct ip6_hdr) && (m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { @@ -427,8 +427,7 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff, } ip6 = mtod(m, struct ip6_hdr *); - ip6->ip6_plen = htons(m->m_pkthdr.len - - sizeof(struct ip6_hdr)); + ip6->ip6_plen = htons(m->m_pkthdr.len - skip); /* Save protocol */ m_copydata(m, protoff, 1, (unsigned char *) &prot); |