]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/ip_tables.c
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / ip_tables.c
index 50cc4b92e2845ae2699e225807582370b09621da..39ab8ae282e25fe15d602d0d18f3dd27a60ffdfc 100644 (file)
@@ -198,7 +198,7 @@ int do_match(struct ipt_entry_match *m,
 {
        /* Stop iteration if it doesn't match */
        if (!m->u.kernel.match->match(skb, in, out, m->u.kernel.match, m->data,
-                                     offset, skb->nh.iph->ihl*4, hotdrop))
+                                     offset, ip_hdrlen(skb), hotdrop))
                return 1;
        else
                return 0;
@@ -231,7 +231,7 @@ ipt_do_table(struct sk_buff **pskb,
        struct xt_table_info *private;
 
        /* Initialization */
-       ip = (*pskb)->nh.iph;
+       ip = ip_hdr(*pskb);
        datalen = (*pskb)->len - ip->ihl * 4;
        indev = in ? in->name : nulldevname;
        outdev = out ? out->name : nulldevname;
@@ -320,7 +320,7 @@ ipt_do_table(struct sk_buff **pskb,
                                        = 0x57acc001;
 #endif
                                /* Target might have changed stuff. */
-                               ip = (*pskb)->nh.iph;
+                               ip = ip_hdr(*pskb);
                                datalen = (*pskb)->len - ip->ihl * 4;
 
                                if (verdict == IPT_CONTINUE)