]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/ip_queue.c
Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / net / ipv4 / netfilter / ip_queue.c
index 500998a2dec1945c3208b88a9b4e814e62e656d4..26a37cedcf2e3ab1ecb7620e02dd66be7754d961 100644 (file)
@@ -296,9 +296,8 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct nf_queue_entry *e)
                if (v->data_len > 0xFFFF)
                        return -EINVAL;
                if (diff > skb_tailroom(e->skb)) {
-                       nskb = skb_copy_expand(e->skb, 0,
-                                              diff - skb_tailroom(e->skb),
-                                              GFP_ATOMIC);
+                       nskb = skb_copy_expand(e->skb, skb_headroom(e->skb),
+                                              diff, GFP_ATOMIC);
                        if (!nskb) {
                                printk(KERN_WARNING "ip_queue: error "
                                      "in mangle, dropping packet\n");
@@ -588,11 +587,9 @@ static int __init ip_queue_init(void)
        }
 
 #ifdef CONFIG_PROC_FS
-       proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net);
-       if (proc) {
-               proc->owner = THIS_MODULE;
-               proc->proc_fops = &ip_queue_proc_fops;
-       } else {
+       proc = proc_create(IPQ_PROC_FS_NAME, 0, init_net.proc_net,
+                          &ip_queue_proc_fops);
+       if (!proc) {
                printk(KERN_ERR "ip_queue: failed to create proc entry\n");
                goto cleanup_ipqnl;
        }