]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[linux-2.6] / net / ipv4 / netfilter / nf_conntrack_l3proto_ipv4.c
index ee29f4e9eac2cb596eae0c6dad4be8302f233f4a..f813e02aab3022d890887f4ae4a50711305a6a2a 100644 (file)
@@ -87,14 +87,10 @@ static int ipv4_get_l4proto(const struct sk_buff *skb, unsigned int nhoff,
        if (iph == NULL)
                return -NF_DROP;
 
-       /* Never happen */
-       if (iph->frag_off & htons(IP_OFFSET)) {
-               if (net_ratelimit()) {
-                       printk(KERN_ERR "ipv4_get_l4proto: Frag of proto %u\n",
-                       iph->protocol);
-               }
+       /* Conntrack defragments packets, we might still see fragments
+        * inside ICMP packets though. */
+       if (iph->frag_off & htons(IP_OFFSET))
                return -NF_DROP;
-       }
 
        *dataoff = nhoff + (iph->ihl << 2);
        *protonum = iph->protocol;
@@ -403,9 +399,10 @@ static struct nf_sockopt_ops so_getorigdst = {
        .get_optmin     = SO_ORIGINAL_DST,
        .get_optmax     = SO_ORIGINAL_DST+1,
        .get            = &getorigdst,
+       .owner          = THIS_MODULE,
 };
 
-struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 = {
+struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = {
        .l3proto         = PF_INET,
        .name            = "ipv4",
        .pkt_to_tuple    = ipv4_pkt_to_tuple,
@@ -509,3 +506,9 @@ static void __exit nf_conntrack_l3proto_ipv4_fini(void)
 
 module_init(nf_conntrack_l3proto_ipv4_init);
 module_exit(nf_conntrack_l3proto_ipv4_fini);
+
+void need_ipv4_conntrack(void)
+{
+       return;
+}
+EXPORT_SYMBOL_GPL(need_ipv4_conntrack);