add newer, fixed IMQ patch for 2.6.25 and 2.6.26
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.25 / 150-netfilter_imq.patch
index eb5513050b05a73e75afa3ff21346ea16e6d02f4..fbe2d91de7acefaf3023afd9be8d138e5fd35c94 100644 (file)
@@ -1,8 +1,6 @@
-Index: linux-2.6.25.1/drivers/net/imq.c
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/drivers/net/imq.c
-@@ -0,0 +1,409 @@
++++ b/drivers/net/imq.c
+@@ -0,0 +1,464 @@
 +/*
 + *             Pseudo-driver for the intermediate queue device.
 + *
@@ -26,8 +24,8 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 + *           of IMQ again: http://www.linuximq.net
 + *
 + *
-+ *           2004/06/30 - New version of IMQ patch to kernels <=2.6.7 including
-+ *           the following changes:
++ *           2004/06/30 - New version of IMQ patch to kernels <=2.6.7
++ *             including the following changes:
 + *
 + *           - Correction of ipv6 support "+"s issue (Hasso Tepper)
 + *           - Correction of imq_init_devs() issue that resulted in
@@ -51,6 +49,12 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 + *             Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
 + *             I didn't forget anybody). I apologize again for my lack of time.
 + *
++ *
++ *             2008/06/07 - Changed imq.c to use qdisc_run() instead of
++ *             qdisc_restart() and moved qdisc_run() to tasklet to avoid
++ *             recursive locking. (Jussi Kivilinna)
++ *
++ *
 + *             More info at: http://www.linuximq.net/ (Andre Correa)
 + */
 +
@@ -63,13 +67,17 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +#include <linux/if_arp.h>
 +#include <linux/netfilter.h>
 +#include <linux/netfilter_ipv4.h>
-+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 +      #include <linux/netfilter_ipv6.h>
 +#endif
 +#include <linux/imq.h>
 +#include <net/pkt_sched.h>
++#include <net/netfilter/nf_queue.h>
 +
-+extern int qdisc_restart1(struct net_device *dev);
++struct imq_private {
++      struct tasklet_struct tasklet;
++      int tasklet_pending;
++};
 +
 +static nf_hookfn imq_nf_hook;
 +
@@ -97,7 +105,7 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +#endif
 +};
 +
-+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 +static struct nf_hook_ops imq_ingress_ipv6 = {
 +      .hook           = imq_nf_hook,
 +      .owner          = THIS_MODULE,
@@ -133,90 +141,86 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +
 +static struct net_device_stats *imq_get_stats(struct net_device *dev)
 +{
-+      return (struct net_device_stats *)dev->priv;
++      return &dev->stats;
 +}
 +
 +/* called for packets kfree'd in qdiscs at places other than enqueue */
 +static void imq_skb_destructor(struct sk_buff *skb)
 +{
-+      struct nf_info *info = skb->nf_info;
-+
-+      if (info) {
-+              if (info->indev)
-+                      dev_put(info->indev);
-+              if (info->outdev)
-+                      dev_put(info->outdev);
-+              kfree(info);
++      struct nf_queue_entry *entry = skb->nf_queue_entry;
++
++      if (entry) {
++              if (entry->indev)
++                      dev_put(entry->indev);
++              if (entry->outdev)
++                      dev_put(entry->outdev);
++              kfree(entry);
 +      }
 +}
 +
 +static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 +{
-+      struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
-+
-+      stats->tx_bytes += skb->len;
-+      stats->tx_packets++;
++      dev->stats.tx_bytes += skb->len;
++      dev->stats.tx_packets++;
 +
 +      skb->imq_flags = 0;
 +      skb->destructor = NULL;
 +
 +      dev->trans_start = jiffies;
-+      nf_reinject(skb, skb->nf_info, NF_ACCEPT);
++      nf_reinject(skb->nf_queue_entry, NF_ACCEPT);
 +      return 0;
 +}
 +
-+static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info, unsigned queue_num, void *data)
++static int imq_nf_queue(struct nf_queue_entry *entry, unsigned queue_num)
 +{
 +      struct net_device *dev;
-+      struct net_device_stats *stats;
++      struct imq_private *priv;
 +      struct sk_buff *skb2 = NULL;
 +      struct Qdisc *q;
-+      unsigned int index = skb->imq_flags&IMQ_F_IFMASK;
++      unsigned int index = entry->skb->imq_flags & IMQ_F_IFMASK;
 +      int ret = -1;
 +
 +      if (index > numdevs)
 +              return -1;
 +
 +      dev = imq_devs + index;
++      priv = netdev_priv(dev);
 +      if (!(dev->flags & IFF_UP)) {
-+              skb->imq_flags = 0;
-+              nf_reinject(skb, info, NF_ACCEPT);
++              entry->skb->imq_flags = 0;
++              nf_reinject(entry, NF_ACCEPT);
 +              return 0;
 +      }
 +      dev->last_rx = jiffies;
 +
-+      if (skb->destructor) {
-+              skb2 = skb;
-+              skb = skb_clone(skb, GFP_ATOMIC);
-+              if (!skb)
++      if (entry->skb->destructor) {
++              skb2 = entry->skb;
++              entry->skb = skb_clone(entry->skb, GFP_ATOMIC);
++              if (!entry->skb)
 +                      return -1;
 +      }
-+      skb->nf_info = info;
++      entry->skb->nf_queue_entry = entry;
 +
-+      stats = (struct net_device_stats *)dev->priv;
-+      stats->rx_bytes+= skb->len;
-+      stats->rx_packets++;
++      dev->stats.rx_bytes += entry->skb->len;
++      dev->stats.rx_packets++;
 +
 +      spin_lock_bh(&dev->queue_lock);
 +      q = dev->qdisc;
 +      if (q->enqueue) {
-+              q->enqueue(skb_get(skb), q);
-+              if (skb_shared(skb)) {
-+                      skb->destructor = imq_skb_destructor;
-+                      kfree_skb(skb);
++              q->enqueue(skb_get(entry->skb), q);
++              if (skb_shared(entry->skb)) {
++                      entry->skb->destructor = imq_skb_destructor;
++                      kfree_skb(entry->skb);
 +                      ret = 0;
 +              }
 +      }
-+      if (spin_is_locked(&dev->_xmit_lock))
-+              netif_schedule(dev);
-+      else
-+              while (!netif_queue_stopped(dev) && qdisc_restart1(dev) < 0)
-+                      /* NOTHING */;
 +
 +      spin_unlock_bh(&dev->queue_lock);
 +
++      if (!test_and_set_bit(1, &priv->tasklet_pending))
++              tasklet_schedule(&priv->tasklet);
++
 +      if (skb2)
-+              kfree_skb(ret ? skb : skb2);
++              kfree_skb(ret ? entry->skb : skb2);
 +
 +      return ret;
 +}
@@ -226,6 +230,18 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +      .outfn = imq_nf_queue,
 +};
 +
++static void qdisc_run_tasklet(unsigned long arg)
++{
++      struct net_device *dev = (struct net_device *)arg;
++      struct imq_private *priv = netdev_priv(dev);
++
++      spin_lock(&dev->queue_lock);
++      qdisc_run(dev);
++      spin_unlock(&dev->queue_lock);
++
++      clear_bit(1, &priv->tasklet_pending);
++}
++
 +static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff *pskb,
 +                              const struct net_device *indev,
 +                              const struct net_device *outdev,
@@ -237,30 +253,59 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +      return NF_ACCEPT;
 +}
 +
++static int imq_close(struct net_device *dev)
++{
++      struct imq_private *priv = netdev_priv(dev);
++
++      tasklet_kill(&priv->tasklet);
++      netif_stop_queue(dev);
++
++      return 0;
++}
++
++static int imq_open(struct net_device *dev)
++{
++      struct imq_private *priv = netdev_priv(dev);
++
++      tasklet_init(&priv->tasklet, qdisc_run_tasklet, (unsigned long)dev);
++      netif_start_queue(dev);
++
++      return 0;
++}
 +
 +static int __init imq_init_hooks(void)
 +{
 +      int err;
 +
 +      err = nf_register_queue_handler(PF_INET, &nfqh);
-+      if (err > 0)
++      if (err)
 +              goto err1;
-+      if ((err = nf_register_hook(&imq_ingress_ipv4)))
++
++      err = nf_register_hook(&imq_ingress_ipv4);
++      if (err)
 +              goto err2;
-+      if ((err = nf_register_hook(&imq_egress_ipv4)))
++
++      err = nf_register_hook(&imq_egress_ipv4);
++      if (err)
 +              goto err3;
-+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-+      if ((err = nf_register_queue_handler(PF_INET6, &nfqh)))
++
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
++      err = nf_register_queue_handler(PF_INET6, &nfqh);
++      if (err)
 +              goto err4;
-+      if ((err = nf_register_hook(&imq_ingress_ipv6)))
++
++      err = nf_register_hook(&imq_ingress_ipv6);
++      if (err)
 +              goto err5;
-+      if ((err = nf_register_hook(&imq_egress_ipv6)))
++
++      err = nf_register_hook(&imq_egress_ipv6);
++      if (err)
 +              goto err6;
 +#endif
 +
 +      return 0;
 +
-+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 +err6:
 +      nf_unregister_hook(&imq_ingress_ipv6);
 +err5:
@@ -278,7 +323,7 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +
 +static void __exit imq_unhook(void)
 +{
-+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
++#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 +      nf_unregister_hook(&imq_ingress_ipv6);
 +      nf_unregister_hook(&imq_egress_ipv6);
 +      nf_unregister_queue_handler(PF_INET6, &nfqh);
@@ -291,14 +336,17 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +static int __init imq_dev_init(struct net_device *dev)
 +{
 +      dev->hard_start_xmit    = imq_dev_xmit;
++      dev->open               = imq_open;
++      dev->get_stats          = imq_get_stats;
++      dev->stop               = imq_close;
 +      dev->type               = ARPHRD_VOID;
 +      dev->mtu                = 16000;
 +      dev->tx_queue_len       = 11000;
 +      dev->flags              = IFF_NOARP;
-+      dev->priv = kzalloc(sizeof(struct net_device_stats), GFP_KERNEL);
++
++      dev->priv = kzalloc(sizeof(struct imq_private), GFP_KERNEL);
 +      if (dev->priv == NULL)
 +              return -ENOMEM;
-+      dev->get_stats          = imq_get_stats;
 +
 +      return 0;
 +}
@@ -311,8 +359,7 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +static int __init imq_init_devs(struct net *net)
 +{
 +      struct net_device *dev;
-+      int i,j;
-+      j = numdevs;
++      int i, j;
 +
 +      if (!numdevs || numdevs > IMQ_MAX_DEVS) {
 +              printk(KERN_ERR "IMQ: numdevs has to be betweed 1 and %u\n",
@@ -325,9 +372,9 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +              return -ENOMEM;
 +
 +      /* we start counting at zero */
-+      numdevs--;
++      j = numdevs - 1;
 +
-+      for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
++      for (i = 0, dev = imq_devs; i <= j; i++, dev++) {
 +              strcpy(dev->name, "imq%d");
 +              dev->init   = imq_dev_init;
 +              dev->uninit = imq_dev_uninit;
@@ -336,7 +383,7 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +              if (register_netdev(dev) < 0)
 +                      goto err_register;
 +      }
-+      printk(KERN_INFO "IMQ starting with %u devices...\n", j);
++      printk(KERN_INFO "IMQ starting with %u devices...\n", numdevs);
 +      return 0;
 +
 +err_register:
@@ -361,11 +408,14 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +{
 +      int err;
 +
-+      if ((err = imq_init_devs(net))) {
++      err = imq_init_devs(net);
++      if (err) {
 +              printk(KERN_ERR "IMQ: Error trying imq_init_devs(net)\n");
 +              return err;
 +      }
-+      if ((err = imq_init_hooks())) {
++
++      err = imq_init_hooks();
++      if (err) {
 +              printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n");
 +              imq_cleanup_devs();
 +              return err;
@@ -395,28 +445,29 @@ Index: linux-2.6.25.1/drivers/net/imq.c
 +}
 +
 +static struct pernet_operations __net_initdata imq_net_ops = {
-+    .init = imq_init_module,
-+    .exit = imq_exit_module,
++      .init = imq_init_module,
++      .exit = imq_exit_module,
 +};
 +
 +static int __init imq_init(void)
 +{
-+    return register_pernet_device(&imq_net_ops);
++      return register_pernet_device(&imq_net_ops);
 +}
 +
 +module_init(imq_init);
-+//module_exit(imq_cleanup_module);
++/*module_exit(imq_cleanup_module);*/
 +
 +module_param(numdevs, int, 0);
-+MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will be created)");
++MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will "
++                      "be created)");
 +MODULE_AUTHOR("http://www.linuximq.net");
-+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
++MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See "
++                      "http://www.linuximq.net/ for more information.");
 +MODULE_LICENSE("GPL");
-Index: linux-2.6.25.1/drivers/net/Kconfig
-===================================================================
---- linux-2.6.25.1.orig/drivers/net/Kconfig
-+++ linux-2.6.25.1/drivers/net/Kconfig
-@@ -117,6 +117,129 @@ config EQUALIZER
++
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -117,6 +117,129 @@
          To compile this driver as a module, choose M here: the module
          will be called eql.  If unsure, say N.
  
@@ -546,11 +597,9 @@ Index: linux-2.6.25.1/drivers/net/Kconfig
  config TUN
        tristate "Universal TUN/TAP device driver support"
        select CRC32
-Index: linux-2.6.25.1/drivers/net/Makefile
-===================================================================
---- linux-2.6.25.1.orig/drivers/net/Makefile
-+++ linux-2.6.25.1/drivers/net/Makefile
-@@ -143,6 +143,7 @@ obj-$(CONFIG_SLHC) += slhc.o
+--- a/drivers/net/Makefile
++++ b/drivers/net/Makefile
+@@ -143,6 +143,7 @@
  obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o
  
  obj-$(CONFIG_DUMMY) += dummy.o
@@ -558,10 +607,8 @@ Index: linux-2.6.25.1/drivers/net/Makefile
  obj-$(CONFIG_IFB) += ifb.o
  obj-$(CONFIG_MACVLAN) += macvlan.o
  obj-$(CONFIG_DE600) += de600.o
-Index: linux-2.6.25.1/include/linux/imq.h
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/include/linux/imq.h
++++ b/include/linux/imq.h
 @@ -0,0 +1,9 @@
 +#ifndef _IMQ_H
 +#define _IMQ_H
@@ -572,10 +619,8 @@ Index: linux-2.6.25.1/include/linux/imq.h
 +#define IMQ_F_ENQUEUE  0x80
 +
 +#endif /* _IMQ_H */
-Index: linux-2.6.25.1/include/linux/netfilter_ipv4/ipt_IMQ.h
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/include/linux/netfilter_ipv4/ipt_IMQ.h
++++ b/include/linux/netfilter_ipv4/ipt_IMQ.h
 @@ -0,0 +1,8 @@
 +#ifndef _IPT_IMQ_H
 +#define _IPT_IMQ_H
@@ -585,10 +630,8 @@ Index: linux-2.6.25.1/include/linux/netfilter_ipv4/ipt_IMQ.h
 +};
 +
 +#endif /* _IPT_IMQ_H */
-Index: linux-2.6.25.1/include/linux/netfilter_ipv6/ip6t_IMQ.h
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/include/linux/netfilter_ipv6/ip6t_IMQ.h
++++ b/include/linux/netfilter_ipv6/ip6t_IMQ.h
 @@ -0,0 +1,8 @@
 +#ifndef _IP6T_IMQ_H
 +#define _IP6T_IMQ_H
@@ -598,36 +641,32 @@ Index: linux-2.6.25.1/include/linux/netfilter_ipv6/ip6t_IMQ.h
 +};
 +
 +#endif /* _IP6T_IMQ_H */
-Index: linux-2.6.25.1/include/linux/skbuff.h
-===================================================================
---- linux-2.6.25.1.orig/include/linux/skbuff.h
-+++ linux-2.6.25.1/include/linux/skbuff.h
-@@ -296,6 +296,10 @@ struct sk_buff {
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
+@@ -296,6 +296,10 @@
        struct nf_conntrack     *nfct;
        struct sk_buff          *nfct_reasm;
  #endif
 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
-+      unsigned char           imq_flags;
-+      struct nf_info          *nf_info;
++      unsigned char                   imq_flags;
++      struct nf_queue_entry   *nf_queue_entry;
 +#endif
  #ifdef CONFIG_BRIDGE_NETFILTER
        struct nf_bridge_info   *nf_bridge;
  #endif
-@@ -1736,6 +1740,10 @@ static inline void __nf_copy(struct sk_b
+@@ -1736,6 +1740,10 @@
        dst->nfct_reasm = src->nfct_reasm;
        nf_conntrack_get_reasm(src->nfct_reasm);
  #endif
 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
 +      dst->imq_flags = src->imq_flags;
-+      dst->nf_info = src->nf_info;
++      dst->nf_queue_entry = src->nf_queue_entry;
 +#endif
  #ifdef CONFIG_BRIDGE_NETFILTER
        dst->nf_bridge  = src->nf_bridge;
        nf_bridge_get(src->nf_bridge);
-Index: linux-2.6.25.1/net/core/dev.c
-===================================================================
---- linux-2.6.25.1.orig/net/core/dev.c
-+++ linux-2.6.25.1/net/core/dev.c
+--- a/net/core/dev.c
++++ b/net/core/dev.c
 @@ -95,6 +95,9 @@
  #include <net/net_namespace.h>
  #include <net/sock.h>
@@ -638,7 +677,7 @@ Index: linux-2.6.25.1/net/core/dev.c
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
  #include <linux/stat.h>
-@@ -1537,7 +1540,11 @@ static int dev_gso_segment(struct sk_buf
+@@ -1537,7 +1540,11 @@
  int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
  {
        if (likely(!skb->next)) {
@@ -651,10 +690,8 @@ Index: linux-2.6.25.1/net/core/dev.c
                        dev_queue_xmit_nit(skb, dev);
  
                if (netif_needs_gso(dev, skb)) {
-Index: linux-2.6.25.1/net/ipv4/netfilter/ipt_IMQ.c
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/net/ipv4/netfilter/ipt_IMQ.c
++++ b/net/ipv4/netfilter/ipt_IMQ.c
 @@ -0,0 +1,69 @@
 +/*
 + * This target marks packets to be enqueued to an imq device
@@ -725,17 +762,15 @@ Index: linux-2.6.25.1/net/ipv4/netfilter/ipt_IMQ.c
 +MODULE_AUTHOR("http://www.linuximq.net");
 +MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
 +MODULE_LICENSE("GPL");
-Index: linux-2.6.25.1/net/ipv4/netfilter/Kconfig
-===================================================================
---- linux-2.6.25.1.orig/net/ipv4/netfilter/Kconfig
-+++ linux-2.6.25.1/net/ipv4/netfilter/Kconfig
-@@ -315,6 +315,17 @@ config IP_NF_MANGLE
+--- a/net/ipv4/netfilter/Kconfig
++++ b/net/ipv4/netfilter/Kconfig
+@@ -145,6 +145,17 @@
  
          To compile it as a module, choose M here.  If unsure, say N.
  
 +config IP_NF_TARGET_IMQ
 +       tristate "IMQ target support"
-+       depends on IP_NF_MANGLE && IMQ
++       depends on IP_NF_MANGLE
 +       help
 +         This option adds a `IMQ' target which is used to specify if and
 +         to which IMQ device packets should get enqueued/dequeued.
@@ -744,14 +779,12 @@ Index: linux-2.6.25.1/net/ipv4/netfilter/Kconfig
 +
 +         To compile it as a module, choose M here.  If unsure, say N.
 +
- config IP_NF_TARGET_ECN
-       tristate "ECN target support"
-       depends on IP_NF_MANGLE
-Index: linux-2.6.25.1/net/ipv4/netfilter/Makefile
-===================================================================
---- linux-2.6.25.1.orig/net/ipv4/netfilter/Makefile
-+++ linux-2.6.25.1/net/ipv4/netfilter/Makefile
-@@ -55,6 +55,7 @@ obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_i
+ config IP_NF_TARGET_REJECT
+       tristate "REJECT target support"
+       depends on IP_NF_FILTER
+--- a/net/ipv4/netfilter/Makefile
++++ b/net/ipv4/netfilter/Makefile
+@@ -55,6 +55,7 @@
  obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
  obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
  obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o
@@ -759,10 +792,8 @@ Index: linux-2.6.25.1/net/ipv4/netfilter/Makefile
  obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
  obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
  obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
-Index: linux-2.6.25.1/net/ipv6/netfilter/ip6t_IMQ.c
-===================================================================
 --- /dev/null
-+++ linux-2.6.25.1/net/ipv6/netfilter/ip6t_IMQ.c
++++ b/net/ipv6/netfilter/ip6t_IMQ.c
 @@ -0,0 +1,69 @@
 +/*
 + * This target marks packets to be enqueued to an imq device
@@ -833,11 +864,9 @@ Index: linux-2.6.25.1/net/ipv6/netfilter/ip6t_IMQ.c
 +MODULE_AUTHOR("http://www.linuximq.net");
 +MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
 +MODULE_LICENSE("GPL");
-Index: linux-2.6.25.1/net/ipv6/netfilter/Kconfig
-===================================================================
---- linux-2.6.25.1.orig/net/ipv6/netfilter/Kconfig
-+++ linux-2.6.25.1/net/ipv6/netfilter/Kconfig
-@@ -179,6 +179,15 @@ config IP6_NF_MANGLE
+--- a/net/ipv6/netfilter/Kconfig
++++ b/net/ipv6/netfilter/Kconfig
+@@ -179,6 +179,15 @@
  
          To compile it as a module, choose M here.  If unsure, say N.
  
@@ -853,10 +882,8 @@ Index: linux-2.6.25.1/net/ipv6/netfilter/Kconfig
  config IP6_NF_TARGET_HL
        tristate  'HL (hoplimit) target support'
        depends on IP6_NF_MANGLE
-Index: linux-2.6.25.1/net/ipv6/netfilter/Makefile
-===================================================================
---- linux-2.6.25.1.orig/net/ipv6/netfilter/Makefile
-+++ linux-2.6.25.1/net/ipv6/netfilter/Makefile
+--- a/net/ipv6/netfilter/Makefile
++++ b/net/ipv6/netfilter/Makefile
 @@ -6,6 +6,7 @@
  obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
  obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
@@ -865,21 +892,13 @@ Index: linux-2.6.25.1/net/ipv6/netfilter/Makefile
  obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
  obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
  
-Index: linux-2.6.25.1/net/sched/sch_generic.c
-===================================================================
---- linux-2.6.25.1.orig/net/sched/sch_generic.c
-+++ linux-2.6.25.1/net/sched/sch_generic.c
-@@ -182,6 +182,13 @@ static inline int qdisc_restart(struct n
-       return ret;
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -203,6 +203,7 @@
+       clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
  }
++EXPORT_SYMBOL(__qdisc_run);
  
-+int qdisc_restart1(struct net_device *dev)
-+{
-+      return qdisc_restart(dev);
-+}
-+
-+EXPORT_SYMBOL(qdisc_restart1);
-+
- void __qdisc_run(struct net_device *dev)
+ static void dev_watchdog(unsigned long arg)
  {
-       unsigned long start_time = jiffies;