Changeset 10145


Ignore:
Timestamp:
2008-01-08T19:21:22+01:00 (10 years ago)
Author:
pavlov
Message:

update to the latest imq patch for 2.6.23 from http://www.actusa.net/~linuximq/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic-2.6/patches-2.6.23/150-netfilter_imq.patch

    r9234 r10145  
    1 Index: linux-2.6.23/drivers/net/imq.c 
    2 =================================================================== 
    3 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    4 +++ linux-2.6.23/drivers/net/imq.c      2007-10-10 13:52:54.000000000 +0800 
    5 @@ -0,0 +1,402 @@ 
     1diff -Naurw linux-2.6.23/drivers/net/imq.c linux-2.6.23.imq/drivers/net/imq.c 
     2--- linux-2.6.23/drivers/net/imq.c      1969-12-31 21:00:00.000000000 -0300 
     3+++ linux-2.6.23.imq/drivers/net/imq.c  2007-10-01 09:59:23.000000000 -0300 
     4@@ -0,0 +1,400 @@ 
    65+/* 
    76+ *             Pseudo-driver for the intermediate queue device. 
     
    127126+static unsigned int numdevs = CONFIG_IMQ_NUM_DEVS; 
    128127+#else 
    129 +static unsigned int numdevs = 2; 
     128+static unsigned int numdevs = 16; 
    130129+#endif 
    131130+ 
     
    279278+static void __exit imq_unhook(void) 
    280279+{ 
    281 +       nf_unregister_hook(&imq_ingress_ipv4); 
    282 +       nf_unregister_hook(&imq_egress_ipv4); 
    283 +       nf_unregister_queue_handler(PF_INET, &nfqh); 
    284280+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 
    285281+       nf_unregister_hook(&imq_ingress_ipv6); 
     
    287283+       nf_unregister_queue_handler(PF_INET6, &nfqh); 
    288284+#endif 
     285+       nf_unregister_hook(&imq_ingress_ipv4); 
     286+       nf_unregister_hook(&imq_egress_ipv4); 
     287+       nf_unregister_queue_handler(PF_INET, &nfqh); 
    289288+} 
    290289+ 
     
    293292+       dev->hard_start_xmit    = imq_dev_xmit; 
    294293+       dev->type               = ARPHRD_VOID; 
    295 +       dev->mtu                = 1500; 
    296 +       dev->tx_queue_len       = 30; 
     294+       dev->mtu                = 16000; 
     295+       dev->tx_queue_len       = 11000; 
    297296+       dev->flags              = IFF_NOARP; 
    298 +       dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL); 
     297+       dev->priv = kzalloc(sizeof(struct net_device_stats), GFP_KERNEL); 
    299298+       if (dev->priv == NULL) 
    300299+               return -ENOMEM; 
    301 +       memset(dev->priv, 0, sizeof(struct net_device_stats)); 
    302300+       dev->get_stats          = imq_get_stats; 
    303301+ 
     
    322320+       } 
    323321+ 
    324 +       imq_devs = kmalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL); 
     322+       imq_devs = kzalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL); 
    325323+       if (!imq_devs) 
    326324+               return -ENOMEM; 
    327 +       memset(imq_devs, 0, sizeof(struct net_device) * numdevs); 
    328325+ 
    329326+       /* we start counting at zero */ 
     
    401398+module_exit(imq_cleanup_module); 
    402399+ 
    403 +module_param(numdevs, int, 0); 
     400+module_param(numdevs, int, 16); 
    404401+MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will be created)"); 
    405402+MODULE_AUTHOR("http://www.linuximq.net"); 
    406403+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information."); 
    407404+MODULE_LICENSE("GPL"); 
    408 Index: linux-2.6.23/drivers/net/Kconfig 
    409 =================================================================== 
    410 --- linux-2.6.23.orig/drivers/net/Kconfig       2007-10-10 04:31:38.000000000 +0800 
    411 +++ linux-2.6.23/drivers/net/Kconfig    2007-10-10 13:52:54.000000000 +0800 
     405diff -Naurw linux-2.6.23/drivers/net/Kconfig linux-2.6.23.imq/drivers/net/Kconfig 
     406--- linux-2.6.23/drivers/net/Kconfig    2007-10-01 09:04:50.000000000 -0300 
     407+++ linux-2.6.23.imq/drivers/net/Kconfig        2007-10-01 09:55:14.000000000 -0300 
    412408@@ -112,6 +112,129 @@ 
    413409          To compile this driver as a module, choose M here: the module 
     
    433429+       prompt "IMQ behavior (PRE/POSTROUTING)" 
    434430+       depends on IMQ 
    435 +       default IMQ_BEHAVIOR_BA 
     431+       default IMQ_BEHAVIOR_AB 
    436432+       help 
    437433+ 
     
    523519+ 
    524520+       int "Number of IMQ devices" 
    525 +       range 2 8 
     521+       range 2 16 
    526522+       depends on IMQ 
    527 +       default "2" 
     523+       default "16" 
    528524+       help 
    529525+ 
     
    531527+               created. 
    532528+ 
    533 +               The default value is 2. 
     529+               The default value is 16. 
    534530+ 
    535531+               More information can be found at: www.linuximq.net 
     
    540536        tristate "Universal TUN/TAP device driver support" 
    541537        select CRC32 
    542 Index: linux-2.6.23/drivers/net/Makefile 
    543 =================================================================== 
    544 --- linux-2.6.23.orig/drivers/net/Makefile      2007-10-10 04:31:38.000000000 +0800 
    545 +++ linux-2.6.23/drivers/net/Makefile   2007-10-10 13:52:54.000000000 +0800 
     538diff -Naurw linux-2.6.23/drivers/net/Makefile linux-2.6.23.imq/drivers/net/Makefile 
     539--- linux-2.6.23/drivers/net/Makefile   2007-10-01 09:04:50.000000000 -0300 
     540+++ linux-2.6.23.imq/drivers/net/Makefile       2007-10-01 09:55:14.000000000 -0300 
    546541@@ -131,6 +131,7 @@ 
    547542 obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o 
     
    552547 obj-$(CONFIG_MACVLAN) += macvlan.o 
    553548 obj-$(CONFIG_DE600) += de600.o 
    554 Index: linux-2.6.23/include/linux/imq.h 
    555 =================================================================== 
    556 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    557 +++ linux-2.6.23/include/linux/imq.h    2007-10-10 13:52:54.000000000 +0800 
     549diff -Naurw linux-2.6.23/include/linux/imq.h linux-2.6.23.imq/include/linux/imq.h 
     550--- linux-2.6.23/include/linux/imq.h    1969-12-31 21:00:00.000000000 -0300 
     551+++ linux-2.6.23.imq/include/linux/imq.h        2007-10-01 09:55:14.000000000 -0300 
    558552@@ -0,0 +1,9 @@ 
    559553+#ifndef _IMQ_H 
     
    566560+ 
    567561+#endif /* _IMQ_H */ 
    568 Index: linux-2.6.23/include/linux/netfilter_ipv4/ipt_IMQ.h 
    569 =================================================================== 
    570 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    571 +++ linux-2.6.23/include/linux/netfilter_ipv4/ipt_IMQ.h 2007-10-10 13:52:54.000000000 +0800 
     562diff -Naurw linux-2.6.23/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.23.imq/include/linux/netfilter_ipv4/ipt_IMQ.h 
     563--- linux-2.6.23/include/linux/netfilter_ipv4/ipt_IMQ.h 1969-12-31 21:00:00.000000000 -0300 
     564+++ linux-2.6.23.imq/include/linux/netfilter_ipv4/ipt_IMQ.h     2007-10-01 09:55:14.000000000 -0300 
    572565@@ -0,0 +1,8 @@ 
    573566+#ifndef _IPT_IMQ_H 
     
    579572+ 
    580573+#endif /* _IPT_IMQ_H */ 
    581 Index: linux-2.6.23/include/linux/netfilter_ipv6/ip6t_IMQ.h 
    582 =================================================================== 
    583 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    584 +++ linux-2.6.23/include/linux/netfilter_ipv6/ip6t_IMQ.h        2007-10-10 13:52:54.000000000 +0800 
     574diff -Naurw linux-2.6.23/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.23.imq/include/linux/netfilter_ipv6/ip6t_IMQ.h 
     575--- linux-2.6.23/include/linux/netfilter_ipv6/ip6t_IMQ.h        1969-12-31 21:00:00.000000000 -0300 
     576+++ linux-2.6.23.imq/include/linux/netfilter_ipv6/ip6t_IMQ.h    2007-10-01 09:55:14.000000000 -0300 
    585577@@ -0,0 +1,8 @@ 
    586578+#ifndef _IP6T_IMQ_H 
     
    592584+ 
    593585+#endif /* _IP6T_IMQ_H */ 
    594 Index: linux-2.6.23/include/linux/skbuff.h 
    595 =================================================================== 
    596 --- linux-2.6.23.orig/include/linux/skbuff.h    2007-10-10 04:31:38.000000000 +0800 
    597 +++ linux-2.6.23/include/linux/skbuff.h 2007-10-10 13:52:54.000000000 +0800 
     586diff -Naurw linux-2.6.23/include/linux/skbuff.h linux-2.6.23.imq/include/linux/skbuff.h 
     587--- linux-2.6.23/include/linux/skbuff.h 2007-10-01 09:05:08.000000000 -0300 
     588+++ linux-2.6.23.imq/include/linux/skbuff.h     2007-10-01 09:55:14.000000000 -0300 
    598589@@ -296,6 +296,10 @@ 
    599590        struct nf_conntrack     *nfct; 
     
    607598        struct nf_bridge_info   *nf_bridge; 
    608599 #endif 
    609 Index: linux-2.6.23/net/core/dev.c 
    610 =================================================================== 
    611 --- linux-2.6.23.orig/net/core/dev.c    2007-10-10 04:31:38.000000000 +0800 
    612 +++ linux-2.6.23/net/core/dev.c 2007-10-10 13:52:54.000000000 +0800 
     600@@ -1726,6 +1730,10 @@ 
     601        dst->nfct_reasm = src->nfct_reasm; 
     602        nf_conntrack_get_reasm(src->nfct_reasm); 
     603 #endif 
     604+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) 
     605+       dst->imq_flags = src->imq_flags; 
     606+       dst->nf_info = src->nf_info; 
     607+#endif 
     608 #ifdef CONFIG_BRIDGE_NETFILTER 
     609        dst->nf_bridge  = src->nf_bridge; 
     610        nf_bridge_get(src->nf_bridge); 
     611diff -Naurw linux-2.6.23/net/core/dev.c linux-2.6.23.imq/net/core/dev.c 
     612--- linux-2.6.23/net/core/dev.c 2007-10-01 09:05:10.000000000 -0300 
     613+++ linux-2.6.23.imq/net/core/dev.c     2007-10-01 09:55:14.000000000 -0300 
    613614@@ -94,6 +94,9 @@ 
    614615 #include <linux/skbuff.h> 
     
    621622 #include <linux/seq_file.h> 
    622623 #include <linux/stat.h> 
    623 @@ -1463,6 +1466,9 @@ 
     624@@ -1462,7 +1465,11 @@ 
     625 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 
    624626 { 
    625627        if (likely(!skb->next)) { 
    626                 if (!list_empty(&ptype_all)) 
     628-               if (!list_empty(&ptype_all)) 
     629+               if (!list_empty(&ptype_all) 
    627630+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) 
    628 +                   if (!(skb->imq_flags & IMQ_F_ENQUEUE)) 
    629 +#endif 
     631+                   && !(skb->imq_flags & IMQ_F_ENQUEUE) 
     632+#endif 
     633+                   ) 
    630634                        dev_queue_xmit_nit(skb, dev); 
    631635  
    632636                if (netif_needs_gso(dev, skb)) { 
    633 Index: linux-2.6.23/net/core/skbuff.c 
    634 =================================================================== 
    635 --- linux-2.6.23.orig/net/core/skbuff.c 2007-10-10 04:31:38.000000000 +0800 
    636 +++ linux-2.6.23/net/core/skbuff.c      2007-10-10 13:52:54.000000000 +0800 
    637 @@ -421,6 +421,10 @@ 
    638         C(ip_summed); 
    639         skb_copy_queue_mapping(n, skb); 
    640         C(priority); 
    641 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) 
    642 +       C(imq_flags); 
    643 +       C(nf_info); 
    644 +#endif /*CONFIG_IMQ*/ 
    645  #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) 
    646         C(ipvs_property); 
    647  #endif 
    648 @@ -496,6 +500,10 @@ 
    649  #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) 
    650         new->ipvs_property = old->ipvs_property; 
    651  #endif 
    652 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE) 
    653 +       new->imq_flags  = old->imq_flags; 
    654 +       new->nf_info    = old->nf_info; 
    655 +#endif /*CONFIG_IMQ*/ 
    656  #ifdef CONFIG_NET_SCHED 
    657  #ifdef CONFIG_NET_CLS_ACT 
    658         new->tc_verd = old->tc_verd; 
    659 Index: linux-2.6.23/net/ipv4/netfilter/ipt_IMQ.c 
    660 =================================================================== 
    661 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    662 +++ linux-2.6.23/net/ipv4/netfilter/ipt_IMQ.c   2007-10-10 13:52:54.000000000 +0800 
     637diff -Naurw linux-2.6.23/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.23.imq/net/ipv4/netfilter/ipt_IMQ.c 
     638--- linux-2.6.23/net/ipv4/netfilter/ipt_IMQ.c   1969-12-31 21:00:00.000000000 -0300 
     639+++ linux-2.6.23.imq/net/ipv4/netfilter/ipt_IMQ.c       2007-10-01 09:55:14.000000000 -0300 
    663640@@ -0,0 +1,69 @@ 
    664641+/* 
     
    731708+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information."); 
    732709+MODULE_LICENSE("GPL"); 
    733 Index: linux-2.6.23/net/ipv4/netfilter/Kconfig 
    734 =================================================================== 
    735 --- linux-2.6.23.orig/net/ipv4/netfilter/Kconfig        2007-10-10 13:52:53.000000000 +0800 
    736 +++ linux-2.6.23/net/ipv4/netfilter/Kconfig     2007-10-10 13:52:54.000000000 +0800 
    737 @@ -351,6 +351,17 @@ 
     710diff -Naurw linux-2.6.23/net/ipv4/netfilter/Kconfig linux-2.6.23.imq/net/ipv4/netfilter/Kconfig 
     711--- linux-2.6.23/net/ipv4/netfilter/Kconfig     2007-10-01 09:05:12.000000000 -0300 
     712+++ linux-2.6.23.imq/net/ipv4/netfilter/Kconfig 2007-10-01 09:55:14.000000000 -0300 
     713@@ -311,6 +311,17 @@ 
    738714  
    739715          To compile it as a module, choose M here.  If unsure, say N. 
     
    753729        tristate "TOS target support" 
    754730        depends on IP_NF_MANGLE 
    755 Index: linux-2.6.23/net/ipv4/netfilter/Makefile 
    756 =================================================================== 
    757 --- linux-2.6.23.orig/net/ipv4/netfilter/Makefile       2007-10-10 13:52:53.000000000 +0800 
    758 +++ linux-2.6.23/net/ipv4/netfilter/Makefile    2007-10-10 13:52:54.000000000 +0800 
    759 @@ -58,6 +58,7 @@ 
     731diff -Naurw linux-2.6.23/net/ipv4/netfilter/Makefile linux-2.6.23.imq/net/ipv4/netfilter/Makefile 
     732--- linux-2.6.23/net/ipv4/netfilter/Makefile    2007-10-01 09:03:13.000000000 -0300 
     733+++ linux-2.6.23.imq/net/ipv4/netfilter/Makefile        2007-10-01 09:55:14.000000000 -0300 
     734@@ -54,6 +54,7 @@ 
    760735 obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o 
    761736 obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o 
     
    765740 obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o 
    766741 obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o 
    767 Index: linux-2.6.23/net/ipv6/netfilter/ip6t_IMQ.c 
    768 =================================================================== 
    769 --- /dev/null   1970-01-01 00:00:00.000000000 +0000 
    770 +++ linux-2.6.23/net/ipv6/netfilter/ip6t_IMQ.c  2007-10-10 13:52:54.000000000 +0800 
     742diff -Naurw linux-2.6.23/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.23.imq/net/ipv6/netfilter/ip6t_IMQ.c 
     743--- linux-2.6.23/net/ipv6/netfilter/ip6t_IMQ.c  1969-12-31 21:00:00.000000000 -0300 
     744+++ linux-2.6.23.imq/net/ipv6/netfilter/ip6t_IMQ.c      2007-10-01 09:55:14.000000000 -0300 
    771745@@ -0,0 +1,69 @@ 
    772746+/* 
     
    793767+} 
    794768+ 
    795 +static int imq_checkentry(const char *tablename, 
     769+static bool imq_checkentry(const char *tablename, 
    796770+                         const void *entry, 
    797771+                         const struct xt_target *target, 
     
    839813+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information."); 
    840814+MODULE_LICENSE("GPL"); 
    841 Index: linux-2.6.23/net/ipv6/netfilter/Kconfig 
    842 =================================================================== 
    843 --- linux-2.6.23.orig/net/ipv6/netfilter/Kconfig        2007-10-10 04:31:38.000000000 +0800 
    844 +++ linux-2.6.23/net/ipv6/netfilter/Kconfig     2007-10-10 13:52:54.000000000 +0800 
     815diff -Naurw linux-2.6.23/net/ipv6/netfilter/Kconfig linux-2.6.23.imq/net/ipv6/netfilter/Kconfig 
     816--- linux-2.6.23/net/ipv6/netfilter/Kconfig     2007-10-01 09:03:12.000000000 -0300 
     817+++ linux-2.6.23.imq/net/ipv6/netfilter/Kconfig 2007-10-01 09:55:14.000000000 -0300 
    845818@@ -173,6 +173,15 @@ 
    846819  
     
    859832        tristate  'HL (hoplimit) target support' 
    860833        depends on IP6_NF_MANGLE 
    861 Index: linux-2.6.23/net/ipv6/netfilter/Makefile 
    862 =================================================================== 
    863 --- linux-2.6.23.orig/net/ipv6/netfilter/Makefile       2007-10-10 04:31:38.000000000 +0800 
    864 +++ linux-2.6.23/net/ipv6/netfilter/Makefile    2007-10-10 13:52:54.000000000 +0800 
     834diff -Naurw linux-2.6.23/net/ipv6/netfilter/Makefile linux-2.6.23.imq/net/ipv6/netfilter/Makefile 
     835--- linux-2.6.23/net/ipv6/netfilter/Makefile    2007-10-01 09:03:12.000000000 -0300 
     836+++ linux-2.6.23.imq/net/ipv6/netfilter/Makefile        2007-10-01 09:55:14.000000000 -0300 
    865837@@ -13,6 +13,7 @@ 
    866838 obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o 
     
    871843 obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o 
    872844 obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o 
    873 Index: linux-2.6.23/net/sched/sch_generic.c 
    874 =================================================================== 
    875 --- linux-2.6.23.orig/net/sched/sch_generic.c   2007-10-10 04:31:38.000000000 +0800 
    876 +++ linux-2.6.23/net/sched/sch_generic.c        2007-10-10 13:52:54.000000000 +0800 
     845diff -Naurw linux-2.6.23/net/sched/sch_generic.c linux-2.6.23.imq/net/sched/sch_generic.c 
     846--- linux-2.6.23/net/sched/sch_generic.c        2007-10-01 09:05:14.000000000 -0300 
     847+++ linux-2.6.23.imq/net/sched/sch_generic.c    2007-10-01 09:55:14.000000000 -0300 
    877848@@ -190,6 +190,11 @@ 
    878849        return ret; 
Note: See TracChangeset for help on using the changeset viewer.