Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
[safe/jmp/linux-2.6] / net / ipv4 / ip_fragment.c
index 7985346..301a389 100644 (file)
@@ -507,7 +507,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
        /* If the first fragment is fragmented itself, we split
         * it to two chunks: the first with data and paged part
         * and the second, holding only fragments. */
-       if (skb_shinfo(head)->frag_list) {
+       if (skb_has_frags(head)) {
                struct sk_buff *clone;
                int i, plen = 0;
 
@@ -516,7 +516,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev,
                clone->next = head->next;
                head->next = clone;
                skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list;
-               skb_shinfo(head)->frag_list = NULL;
+               skb_frag_list_init(head);
                for (i=0; i<skb_shinfo(head)->nr_frags; i++)
                        plen += skb_shinfo(head)->frags[i].size;
                clone->len = clone->data_len = head->data_len - plen;
@@ -563,7 +563,7 @@ out_oversize:
                printk(KERN_INFO "Oversized IP packet from %pI4.\n",
                        &qp->saddr);
 out_fail:
-       IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMFAILS);
+       IP_INC_STATS_BH(net, IPSTATS_MIB_REASMFAILS);
        return err;
 }
 
@@ -573,7 +573,7 @@ int ip_defrag(struct sk_buff *skb, u32 user)
        struct ipq *qp;
        struct net *net;
 
-       net = skb->dev ? dev_net(skb->dev) : dev_net(skb->dst->dev);
+       net = skb->dev ? dev_net(skb->dev) : dev_net(skb_dst(skb)->dev);
        IP_INC_STATS_BH(net, IPSTATS_MIB_REASMREQDS);
 
        /* Start by cleaning up the memory. */
@@ -603,7 +603,6 @@ static int zero;
 
 static struct ctl_table ip4_frags_ns_ctl_table[] = {
        {
-               .ctl_name       = NET_IPV4_IPFRAG_HIGH_THRESH,
                .procname       = "ipfrag_high_thresh",
                .data           = &init_net.ipv4.frags.high_thresh,
                .maxlen         = sizeof(int),
@@ -611,7 +610,6 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
                .proc_handler   = proc_dointvec
        },
        {
-               .ctl_name       = NET_IPV4_IPFRAG_LOW_THRESH,
                .procname       = "ipfrag_low_thresh",
                .data           = &init_net.ipv4.frags.low_thresh,
                .maxlen         = sizeof(int),
@@ -619,26 +617,22 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
                .proc_handler   = proc_dointvec
        },
        {
-               .ctl_name       = NET_IPV4_IPFRAG_TIME,
                .procname       = "ipfrag_time",
                .data           = &init_net.ipv4.frags.timeout,
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_jiffies,
-               .strategy       = sysctl_jiffies
        },
        { }
 };
 
 static struct ctl_table ip4_frags_ctl_table[] = {
        {
-               .ctl_name       = NET_IPV4_IPFRAG_SECRET_INTERVAL,
                .procname       = "ipfrag_secret_interval",
                .data           = &ip4_frags.secret_interval,
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_jiffies,
-               .strategy       = sysctl_jiffies
        },
        {
                .procname       = "ipfrag_max_dist",