u16 hdrlen = skb_transport_offset(pMessage);
                u16 offset = hdrlen + pMessage->csum_offset;
 
-               if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
+               if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
                        (pAC->GIni.GIChipRev == 0) &&
                        (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
                        pTxd->TBControl = BMU_TCP_CHECK;
                ** opcode for udp is not working in the hardware yet 
                ** (Revision 2.0)
                */
-               if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
+               if ((ipip_hdr(pMessage)->protocol == IPPROTO_UDP) &&
                        (pAC->GIni.GIChipRev == 0) &&
                        (pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
                        Control |= BMU_TCP_CHECK;
 
                /* This seems backwards, but it is what the sk98lin
                 * does.  Looks like hardware is wrong?
                 */
-               if (skb->h.ipiph->protocol == IPPROTO_UDP
+               if (ipip_hdr(skb)->protocol == IPPROTO_UDP
                    && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON)
                        control = BMU_TCP_CHECK;
                else
 
 {
        return (struct iphdr *)skb_network_header(skb);
 }
+
+static inline struct iphdr *ipip_hdr(const struct sk_buff *skb)
+{
+       return (struct iphdr *)skb->h.raw;
+}
 #endif
 
 struct ip_auth_hdr {
 
        /* 4 byte hole on 64 bit*/
 
        union {
-               struct iphdr    *ipiph;
                struct ipv6hdr  *ipv6h;
                unsigned char   *raw;
        } h;
 
 
                if (!pskb_may_pull(skb, sizeof(*ph)))
                        goto out;
-               ph = (struct ip_beet_phdr *)(skb->h.ipiph + 1);
+               ph = (struct ip_beet_phdr *)(ipip_hdr(skb) + 1);
 
                phlen = sizeof(*ph) + ph->padlen;
                optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen);
                ph_nexthdr = ph->nexthdr;
        }
 
-       skb->nh.raw = skb->data + (phlen - sizeof(*iph));
+       skb_set_network_header(skb, phlen - sizeof(*iph));
        memmove(skb_network_header(skb), iph, sizeof(*iph));
-       skb->h.raw = skb->data + (phlen + optlen);
+       skb_set_transport_header(skb, phlen + optlen);
        skb->data = skb->h.raw;
 
        iph = ip_hdr(skb);
 
 static inline void ipip_ecn_decapsulate(struct sk_buff *skb)
 {
        struct iphdr *outer_iph = ip_hdr(skb);
-       struct iphdr *inner_iph = skb->h.ipiph;
+       struct iphdr *inner_iph = ipip_hdr(skb);
 
        if (INET_ECN_is_ce(outer_iph->tos))
                IP_ECN_set_ce(inner_iph);
        int flags;
 
        iph = ip_hdr(skb);
-       skb->h.ipiph = iph;
+       skb->h.raw = skb->nh.raw;
 
        skb_push(skb, x->props.header_len);
        skb_reset_network_header(skb);
        iph = ip_hdr(skb);
        if (iph->protocol == IPPROTO_IPIP) {
                if (x->props.flags & XFRM_STATE_DECAP_DSCP)
-                       ipv4_copy_dscp(iph, skb->h.ipiph);
+                       ipv4_copy_dscp(iph, ipip_hdr(skb));
                if (!(x->props.flags & XFRM_STATE_NOECN))
                        ipip_ecn_decapsulate(skb);
        }
 
 static inline void ip6ip_ecn_decapsulate(struct sk_buff *skb)
 {
        if (INET_ECN_is_ce(ipv6_get_dsfield(ipv6_hdr(skb))))
-                       IP_ECN_set_ce(skb->h.ipiph);
+                       IP_ECN_set_ce(ipip_hdr(skb));
 }
 
 /* Add encapsulation header.