]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/ip_queue.c
Merge git://git.infradead.org/battery-2.6
[linux-2.6] / net / ipv4 / netfilter / ip_queue.c
index 15e0d200223511de282822385ceb4bac3ddfc50a..702d94db19b9f5edb12d0a8c77379014ace18211 100644 (file)
@@ -8,18 +8,6 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
- * 2000-03-27: Simplified code (thanks to Andi Kleen for clues).
- * 2000-05-20: Fixed notifier problems (following Miguel Freitas' report).
- * 2000-06-19: Fixed so nfmark is copied to metadata (reported by Sebastian
- *             Zander).
- * 2000-08-01: Added Nick Williams' MAC support.
- * 2002-06-25: Code cleanup.
- * 2005-01-10: Added /proc counter for dropped packets; fixed so
- *             packets aren't delivered to user space if they're going
- *             to be dropped.
- * 2005-05-26: local_bh_{disable,enable} around nf_reinject (Harald Welte)
- *
  */
 #include <linux/module.h>
 #include <linux/skbuff.h>
@@ -380,7 +368,7 @@ ipq_mangle_ipv4(ipq_verdict_msg_t *v, struct ipq_queue_entry *e)
        }
        if (!skb_make_writable(&e->skb, v->data_len))
                return -ENOMEM;
-       memcpy(e->skb->data, v->payload, v->data_len);
+       skb_copy_to_linear_data(e->skb, v->payload, v->data_len);
        e->skb->ip_summed = CHECKSUM_NONE;
 
        return 0;
@@ -497,7 +485,7 @@ ipq_rcv_skb(struct sk_buff *skb)
        if (skblen < sizeof(*nlh))
                return;
 
-       nlh = (struct nlmsghdr *)skb->data;
+       nlh = nlmsg_hdr(skb);
        nlmsglen = nlh->nlmsg_len;
        if (nlmsglen < sizeof(*nlh) || skblen < nlmsglen)
                return;
@@ -680,7 +668,7 @@ static int __init ip_queue_init(void)
 
        netlink_register_notifier(&ipq_nl_notifier);
        ipqnl = netlink_kernel_create(NETLINK_FIREWALL, 0, ipq_rcv_sk,
-                                     THIS_MODULE);
+                                     NULL, THIS_MODULE);
        if (ipqnl == NULL) {
                printk(KERN_ERR "ip_queue: failed to create netlink socket\n");
                goto cleanup_netlink_notifier;