[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
[safe/jmp/linux-2.6] / net / ipv4 / netfilter / ipt_TOS.c
index cedf9f7..0ad02f2 100644 (file)
@@ -29,13 +29,13 @@ target(struct sk_buff **pskb,
        const void *targinfo)
 {
        const struct ipt_tos_target_info *tosinfo = targinfo;
-       struct iphdr *iph = (*pskb)->nh.iph;
+       struct iphdr *iph = ip_hdr(*pskb);
 
        if ((iph->tos & IPTOS_TOS_MASK) != tosinfo->tos) {
                __u8 oldtos;
                if (!skb_make_writable(pskb, sizeof(struct iphdr)))
                        return NF_DROP;
-               iph = (*pskb)->nh.iph;
+               iph = ip_hdr(*pskb);
                oldtos = iph->tos;
                iph->tos = (iph->tos & IPTOS_PREC_MASK) | tosinfo->tos;
                nf_csum_replace2(&iph->check, htons(oldtos), htons(iph->tos));