fix kernel oops in the redboot partition parser when CONFIG_MTD_REDBOOT_PARTS_UNALLOC...
[openwrt.git] / target / linux / generic-2.6 / patches / 150-netfilter_imq.patch
index 742b4e8..66fb99b 100644 (file)
@@ -1,5 +1,7 @@
---- linux-2.6.20-original/drivers/net/imq.c    1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/drivers/net/imq.c     2007-02-12 23:55:04.000000000 +0200
+Index: linux-2.6.21.7/drivers/net/imq.c
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/drivers/net/imq.c
 @@ -0,0 +1,402 @@
 +/*
 + *             Pseudo-driver for the intermediate queue device.
 +err5:
 +      nf_unregister_queue_handler(PF_INET6);
 +err4:
-+      nf_unregister_hook(&imq_egress_ipv6);
++      nf_unregister_hook(&imq_egress_ipv4);
 +#endif
 +err3:
 +      nf_unregister_hook(&imq_ingress_ipv4);
 +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");
---- linux-2.6.20-original/drivers/net/Kconfig  2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/drivers/net/Kconfig   2007-02-12 23:55:04.000000000 +0200
-@@ -96,6 +96,129 @@
+Index: linux-2.6.21.7/drivers/net/Kconfig
+===================================================================
+--- linux-2.6.21.7.orig/drivers/net/Kconfig
++++ linux-2.6.21.7/drivers/net/Kconfig
+@@ -96,6 +96,129 @@ config EQUALIZER
          To compile this driver as a module, choose M here: the module
          will be called eql.  If unsure, say N.
  
 +      default "2"
 +      help
 +
-+              This settings defines how many IMQ devices will be 
++              This settings defines how many IMQ devices will be
 +              created.
 +
 +              The default value is 2.
  config TUN
        tristate "Universal TUN/TAP device driver support"
        select CRC32
---- linux-2.6.20-original/drivers/net/Makefile 2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/drivers/net/Makefile  2007-02-12 23:55:04.000000000 +0200
-@@ -124,6 +124,7 @@
+Index: linux-2.6.21.7/drivers/net/Makefile
+===================================================================
+--- linux-2.6.21.7.orig/drivers/net/Makefile
++++ linux-2.6.21.7/drivers/net/Makefile
+@@ -124,6 +124,7 @@ obj-$(CONFIG_SLIP) += slip.o
  obj-$(CONFIG_SLHC) += slhc.o
  
  obj-$(CONFIG_DUMMY) += dummy.o
  obj-$(CONFIG_IFB) += ifb.o
  obj-$(CONFIG_DE600) += de600.o
  obj-$(CONFIG_DE620) += de620.o
---- linux-2.6.20-original/include/linux/imq.h  1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/include/linux/imq.h   2007-02-12 23:55:04.000000000 +0200
+Index: linux-2.6.21.7/include/linux/imq.h
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/include/linux/imq.h
 @@ -0,0 +1,9 @@
 +#ifndef _IMQ_H
 +#define _IMQ_H
 +#define IMQ_F_ENQUEUE  0x80
 +
 +#endif /* _IMQ_H */
---- linux-2.6.20-original/include/linux/netfilter_ipv4/ipt_IMQ.h       1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/include/linux/netfilter_ipv4/ipt_IMQ.h        2007-02-12 23:55:04.000000000 +0200
+Index: linux-2.6.21.7/include/linux/netfilter_ipv4/ipt_IMQ.h
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/include/linux/netfilter_ipv4/ipt_IMQ.h
 @@ -0,0 +1,8 @@
 +#ifndef _IPT_IMQ_H
 +#define _IPT_IMQ_H
 +};
 +
 +#endif /* _IPT_IMQ_H */
---- linux-2.6.20-original/include/linux/netfilter_ipv6/ip6t_IMQ.h      1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/include/linux/netfilter_ipv6/ip6t_IMQ.h       2007-02-12 23:55:04.000000000 +0200
+Index: linux-2.6.21.7/include/linux/netfilter_ipv6/ip6t_IMQ.h
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/include/linux/netfilter_ipv6/ip6t_IMQ.h
 @@ -0,0 +1,8 @@
 +#ifndef _IP6T_IMQ_H
 +#define _IP6T_IMQ_H
 +};
 +
 +#endif /* _IP6T_IMQ_H */
---- linux-2.6.20-original/include/linux/skbuff.h       2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/include/linux/skbuff.h        2007-02-12 23:55:04.000000000 +0200
-@@ -293,6 +293,10 @@
+Index: linux-2.6.21.7/include/linux/skbuff.h
+===================================================================
+--- linux-2.6.21.7.orig/include/linux/skbuff.h
++++ linux-2.6.21.7/include/linux/skbuff.h
+@@ -294,6 +294,10 @@ struct sk_buff {
  #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
        struct sk_buff          *nfct_reasm;
  #endif
  #ifdef CONFIG_BRIDGE_NETFILTER
        struct nf_bridge_info   *nf_bridge;
  #endif
---- linux-2.6.20-original/net/core/dev.c       2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/core/dev.c        2007-02-12 23:55:04.000000000 +0200
+Index: linux-2.6.21.7/net/core/dev.c
+===================================================================
+--- linux-2.6.21.7.orig/net/core/dev.c
++++ linux-2.6.21.7/net/core/dev.c
 @@ -94,6 +94,9 @@
  #include <linux/skbuff.h>
  #include <net/sock.h>
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
  #include <linux/stat.h>
-@@ -1343,7 +1346,11 @@
+@@ -1340,7 +1343,11 @@ static int dev_gso_segment(struct sk_buf
  int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
  {
        if (likely(!skb->next)) {
                        dev_queue_xmit_nit(skb, dev);
  
                if (netif_needs_gso(dev, skb)) {
---- linux-2.6.20-original/net/core/skbuff.c    2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/core/skbuff.c     2007-02-12 23:55:04.000000000 +0200
-@@ -485,6 +485,10 @@
+Index: linux-2.6.21.7/net/core/skbuff.c
+===================================================================
+--- linux-2.6.21.7.orig/net/core/skbuff.c
++++ linux-2.6.21.7/net/core/skbuff.c
+@@ -430,6 +430,10 @@ struct sk_buff *skb_clone(struct sk_buff
        C(nfct_reasm);
        nf_conntrack_get_reasm(skb->nfct_reasm);
  #endif
  #ifdef CONFIG_BRIDGE_NETFILTER
        C(nf_bridge);
        nf_bridge_get(skb->nf_bridge);
-@@ -549,6 +553,10 @@
+@@ -494,6 +498,10 @@ static void copy_skb_header(struct sk_bu
  #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
        new->ipvs_property = old->ipvs_property;
  #endif
  #ifdef CONFIG_BRIDGE_NETFILTER
        new->nf_bridge  = old->nf_bridge;
        nf_bridge_get(old->nf_bridge);
---- linux-2.6.20-original/net/ipv4/netfilter/ipt_IMQ.c 1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/net/ipv4/netfilter/ipt_IMQ.c  2007-02-12 23:55:04.000000000 +0200
-@@ -0,0 +1,71 @@
+Index: linux-2.6.21.7/net/ipv4/netfilter/ipt_IMQ.c
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/net/ipv4/netfilter/ipt_IMQ.c
+@@ -0,0 +1,69 @@
 +/*
 + * This target marks packets to be enqueued to an imq device
 + */
 +
 +      (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
 +
-+      return IPT_CONTINUE;
++      return XT_CONTINUE;
 +}
 +
 +static int imq_checkentry(const char *tablename,
 +      return 1;
 +}
 +
-+static struct ipt_target ipt_imq_reg = {
++static struct xt_target ipt_imq_reg = {
 +      .name           = "IMQ",
++      .family         = AF_INET,
 +      .target         = imq_target,
 +      .targetsize     = sizeof(struct ipt_imq_info),
 +      .checkentry     = imq_checkentry,
 +
 +static int __init init(void)
 +{
-+      if (xt_register_target(&ipt_imq_reg))
-+              return -EINVAL;
-+
-+      return 0;
++      return xt_register_target(&ipt_imq_reg);
 +}
 +
 +static void __exit fini(void)
 +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");
---- linux-2.6.20-original/net/ipv4/netfilter/Kconfig   2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/ipv4/netfilter/Kconfig    2007-02-12 23:55:04.000000000 +0200
-@@ -591,6 +591,17 @@
+Index: linux-2.6.21.7/net/ipv4/netfilter/Kconfig
+===================================================================
+--- linux-2.6.21.7.orig/net/ipv4/netfilter/Kconfig
++++ linux-2.6.21.7/net/ipv4/netfilter/Kconfig
+@@ -587,6 +587,17 @@ config IP_NF_MANGLE
  
          To compile it as a module, choose M here.  If unsure, say N.
  
  config IP_NF_TARGET_TOS
        tristate "TOS target support"
        depends on IP_NF_MANGLE
---- linux-2.6.20-original/net/ipv4/netfilter/Makefile  2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/ipv4/netfilter/Makefile   2007-02-12 23:55:04.000000000 +0200
-@@ -96,6 +96,7 @@
+Index: linux-2.6.21.7/net/ipv4/netfilter/Makefile
+===================================================================
+--- linux-2.6.21.7.orig/net/ipv4/netfilter/Makefile
++++ linux-2.6.21.7/net/ipv4/netfilter/Makefile
+@@ -99,6 +99,7 @@ obj-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_i
  obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
  obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
  obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
  obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
  obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
  obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
---- linux-2.6.20-original/net/ipv6/netfilter/ip6t_IMQ.c        1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.20/net/ipv6/netfilter/ip6t_IMQ.c 2007-02-12 23:55:04.000000000 +0200
-@@ -0,0 +1,71 @@
+Index: linux-2.6.21.7/net/ipv6/netfilter/ip6t_IMQ.c
+===================================================================
+--- /dev/null
++++ linux-2.6.21.7/net/ipv6/netfilter/ip6t_IMQ.c
+@@ -0,0 +1,69 @@
 +/*
 + * This target marks packets to be enqueued to an imq device
 + */
 +
 +      (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
 +
-+      return IP6T_CONTINUE;
++      return XT_CONTINUE;
 +}
 +
 +static int imq_checkentry(const char *tablename,
 +      return 1;
 +}
 +
-+static struct ip6t_target ip6t_imq_reg = {
++static struct xt_target ip6t_imq_reg = {
 +      .name           = "IMQ",
++      .family         = AF_INET6,
 +      .target         = imq_target,
 +      .targetsize     = sizeof(struct ip6t_imq_info),
 +      .table          = "mangle",
 +
 +static int __init init(void)
 +{
-+      if (ip6t_register_target(&ip6t_imq_reg))
-+              return -EINVAL;
-+
-+      return 0;
++      return xt_register_target(&ip6t_imq_reg);
 +}
 +
 +static void __exit fini(void)
 +{
-+      ip6t_unregister_target(&ip6t_imq_reg);
++      xt_unregister_target(&ip6t_imq_reg);
 +}
 +
 +module_init(init);
 +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");
---- linux-2.6.20-original/net/ipv6/netfilter/Kconfig   2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/ipv6/netfilter/Kconfig    2007-02-12 23:55:04.000000000 +0200
-@@ -164,6 +164,15 @@
+Index: linux-2.6.21.7/net/ipv6/netfilter/Kconfig
+===================================================================
+--- linux-2.6.21.7.orig/net/ipv6/netfilter/Kconfig
++++ linux-2.6.21.7/net/ipv6/netfilter/Kconfig
+@@ -173,6 +173,15 @@ config IP6_NF_MANGLE
  
          To compile it as a module, choose M here.  If unsure, say N.
  
  config IP6_NF_TARGET_HL
        tristate  'HL (hoplimit) target support'
        depends on IP6_NF_MANGLE
---- linux-2.6.20-original/net/ipv6/netfilter/Makefile  2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/ipv6/netfilter/Makefile   2007-02-12 23:55:04.000000000 +0200
-@@ -13,6 +13,7 @@
+Index: linux-2.6.21.7/net/ipv6/netfilter/Makefile
+===================================================================
+--- linux-2.6.21.7.orig/net/ipv6/netfilter/Makefile
++++ linux-2.6.21.7/net/ipv6/netfilter/Makefile
+@@ -13,6 +13,7 @@ obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t
  obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o
  obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
  obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o
  obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o
  obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
  obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
---- linux-2.6.20-original/net/sched/sch_generic.c      2007-02-04 20:44:54.000000000 +0200
-+++ linux-2.6.20/net/sched/sch_generic.c       2007-02-12 23:55:04.000000000 +0200
-@@ -87,7 +87,6 @@
+Index: linux-2.6.21.7/net/sched/sch_generic.c
+===================================================================
+--- linux-2.6.21.7.orig/net/sched/sch_generic.c
++++ linux-2.6.21.7/net/sched/sch_generic.c
+@@ -87,7 +87,6 @@ void qdisc_unlock_tree(struct net_device
  
     NOTE: Called under dev->queue_lock with locally disabled BH.
  */
  static inline int qdisc_restart(struct net_device *dev)
  {
        struct Qdisc *q = dev->qdisc;
-@@ -181,6 +180,11 @@
+@@ -181,6 +180,11 @@ requeue:
        return q->q.qlen;
  }
  
  void __qdisc_run(struct net_device *dev)
  {
        if (unlikely(dev->qdisc == &noop_qdisc))
-@@ -617,3 +621,4 @@
+@@ -617,3 +621,4 @@ EXPORT_SYMBOL(qdisc_destroy);
  EXPORT_SYMBOL(qdisc_reset);
  EXPORT_SYMBOL(qdisc_lock_tree);
  EXPORT_SYMBOL(qdisc_unlock_tree);
This page took 0.054118 seconds and 4 git commands to generate.