#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/mcache.h>
#include <sys/domain.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <netkey/keydb.h>
#include <net/net_osdep.h>
+#include <mach/sdt.h>
#define IPLEN_FLIPPED
size_t newlen, olen;
struct secasvar *sav = NULL;
-
if (m->m_pkthdr.len < off + sizeof(struct ipcomp)) {
ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed "
"(packet too short)\n"));
goto fail;
}
ipcomp = mtod(md, struct ipcomp *);
+
+ /* Expect 32-bit aligned data pointer on strict-align platforms */
+ MBUF_STRICT_DATA_ALIGNMENT_CHECK_32(m);
+
ip = mtod(m, struct ip *);
nxt = ipcomp->comp_nxt;
#ifdef _IP_VHL
IPSEC_STAT_INCREMENT(ipsecstat.in_polvio);
goto fail;
}
+
+ DTRACE_IP6(receive, struct mbuf *, m, struct inpcb *, NULL,
+ struct ip *, ip, struct ifnet *, m->m_pkthdr.rcvif,
+ struct ip *, ip, struct ip6_hdr *, NULL);
+
ip_proto_dispatch_in(m, off, nxt, 0);
} else
m_freem(m);
#if INET6
int
-ipcomp6_input(mp, offp)
- struct mbuf **mp;
- int *offp;
+ipcomp6_input(struct mbuf **mp, int *offp, int proto)
{
+#pragma unused(proto)
struct mbuf *m, *md;
int off;
struct ip6_hdr *ip6;
goto fail;
}
ipcomp = mtod(md, struct ipcomp *);
+
+ /* Expect 32-bit aligned data pointer on strict-align platforms */
+ MBUF_STRICT_DATA_ALIGNMENT_CHECK_32(m);
+
ip6 = mtod(m, struct ip6_hdr *);
nxt = ipcomp->comp_nxt;