]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet6/esp_input.c
xnu-1228.7.58.tar.gz
[apple/xnu.git] / bsd / netinet6 / esp_input.c
index 1286b439f7f685764e519f8212ffa4a62cf38d12..ef9f0af805ff0d162b413600c49a8498a77cc4a7 100644 (file)
@@ -354,7 +354,7 @@ noreplaycheck:
 
        /* strip off the trailing pad area. */
        m_adj(m, -taillen);
-
+       ip = mtod(m, struct ip *);
 #ifdef IPLEN_FLIPPED
        ip->ip_len = ip->ip_len - taillen;
 #else
@@ -795,7 +795,7 @@ noreplaycheck:
 
        /* strip off the trailing pad area. */
        m_adj(m, -taillen);
-
+       ip6 = mtod(m, struct ip6_hdr *);
        ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - taillen);
 
        /* was it transmitted over the IPsec tunnel SA? */