[IP]: Introduce ip_hdrlen()
[deliverable/linux.git] / net / ipv4 / netfilter / iptable_mangle.c
index 98b66ef0c714b93c7235e1bfd5cca07100ba1004..6cc3245f676af73142f3a37bfa8d2f7cbdf69c60 100644 (file)
@@ -17,6 +17,7 @@
 #include <net/sock.h>
 #include <net/route.h>
 #include <linux/ip.h>
+#include <net/ip.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
@@ -136,7 +137,7 @@ ipt_local_hook(unsigned int hook,
 
        /* root is playing with raw sockets. */
        if ((*pskb)->len < sizeof(struct iphdr)
-           || (*pskb)->nh.iph->ihl * 4 < sizeof(struct iphdr)) {
+           || ip_hdrlen(*pskb) < sizeof(struct iphdr)) {
                if (net_ratelimit())
                        printk("ipt_hook: happy cracking.\n");
                return NF_ACCEPT;
This page took 0.03524 seconds and 5 git commands to generate.