1 Index: linux-2.4.35.4/Documentation/Configure.help
2 ===================================================================
3 --- linux-2.4.35.4.orig/Documentation/Configure.help
4 +++ linux-2.4.35.4/Documentation/Configure.help
5 @@ -3160,6 +3160,22 @@ CONFIG_IP_NF_TARGET_TOS
6 If you want to compile it as a module, say M here and read
7 <file:Documentation/modules.txt>. If unsure, say `N'.
10 +CONFIG_IP_NF_TARGET_IMQ
11 + This option adds a `IMQ' target which is used to specify if and
12 + to which imq device packets should get enqueued/dequeued.
14 + If you want to compile it as a module, say M here and read
15 + <file:Documentation/modules.txt>. If unsure, say `N'.
18 +CONFIG_IP6_NF_TARGET_IMQ
19 + This option adds a `IMQ' target which is used to specify if and
20 + to which imq device packets should get enqueued/dequeued.
22 + If you want to compile it as a module, say M here and read
23 + <file:Documentation/modules.txt>. If unsure, say `N'.
26 CONFIG_IP_NF_TARGET_MARK
27 This option adds a `MARK' target, which allows you to create rules
28 @@ -9919,6 +9935,20 @@ CONFIG_BONDING
29 say M here and read <file:Documentation/modules.txt>. The module
30 will be called bonding.o.
32 +Intermediate queueing device support
34 + The imq device(s) is used as placeholder for QoS queueing disciplines.
35 + Every packet entering/leaving the ip stack can be directed through
36 + the imq device where it's enqueued/dequeued to the attached qdisc.
37 + This allows you to treat network devices as classes and distribute
38 + bandwidth among them. Iptables is used to specify through which imq
39 + device, if any, packets travel.
41 + If you want to compile this as a module ( = code which ca be
42 + inserted in and removed from the running kernel whenever you want),
43 + say M here and read <file:Documentation/modules.txt>. The module
44 + will be called imq.o
46 SLIP (serial line) support
48 Say Y if you intend to use SLIP or CSLIP (compressed SLIP) to
49 Index: linux-2.4.35.4/drivers/net/Config.in
50 ===================================================================
51 --- linux-2.4.35.4.orig/drivers/net/Config.in
52 +++ linux-2.4.35.4/drivers/net/Config.in
53 @@ -7,6 +7,11 @@ source drivers/net/arcnet/Config.in
54 tristate 'Dummy net driver support' CONFIG_DUMMY
55 tristate 'Bonding driver support' CONFIG_BONDING
56 tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER
57 +if [ "$CONFIG_NETFILTER" = "y" ]; then
58 + tristate 'IMQ (intermediate queueing device) support' CONFIG_IMQ
60 + comment 'IMQ needs CONFIG_NETFILTER enabled'
62 tristate 'Universal TUN/TAP device driver support' CONFIG_TUN
63 bool 'Allow Net Devices to contribute to /dev/random' CONFIG_NET_RANDOM
64 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
65 Index: linux-2.4.35.4/drivers/net/Makefile
66 ===================================================================
67 --- linux-2.4.35.4.orig/drivers/net/Makefile
68 +++ linux-2.4.35.4/drivers/net/Makefile
69 @@ -176,6 +176,7 @@ endif
71 obj-$(CONFIG_STRIP) += strip.o
72 obj-$(CONFIG_DUMMY) += dummy.o
73 +obj-$(CONFIG_IMQ) += imq.o
74 obj-$(CONFIG_DE600) += de600.o
75 obj-$(CONFIG_DE620) += de620.o
76 obj-$(CONFIG_AT1500) += lance.o
77 Index: linux-2.4.35.4/drivers/net/imq.c
78 ===================================================================
80 +++ linux-2.4.35.4/drivers/net/imq.c
83 + * Pseudo-driver for the intermediate queue device.
85 + * This program is free software; you can redistribute it and/or
86 + * modify it under the terms of the GNU General Public License
87 + * as published by the Free Software Foundation; either version
88 + * 2 of the License, or (at your option) any later version.
90 + * Authors: Patrick McHardy, <kaber@trash.net>
92 + * The first version was written by Martin Devera, <devik@cdi.cz>
94 + * Credits: Jan Rafaj <imq2t@cedric.vabo.cz>
95 + * - Update patch to 2.4.21
96 + * Sebastian Strollo <sstrollo@nortelnetworks.com>
97 + * - Fix "Dead-loop on netdevice imq"-issue
100 +#include <linux/kernel.h>
101 +#include <linux/module.h>
102 +#include <linux/config.h>
103 +#include <linux/skbuff.h>
104 +#include <linux/netdevice.h>
105 +#include <linux/rtnetlink.h>
106 +#include <linux/if_arp.h>
107 +#include <linux/netfilter.h>
108 +#include <linux/netfilter_ipv4.h>
109 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
110 +#include <linux/netfilter_ipv6.h>
112 +#include <linux/imq.h>
113 +#include <net/pkt_sched.h>
115 +static nf_hookfn imq_nf_hook;
117 +static struct nf_hook_ops imq_ingress_ipv4 = {
122 + NF_IP_PRI_MANGLE + 1
125 +static struct nf_hook_ops imq_egress_ipv4 = {
129 + NF_IP_POST_ROUTING,
133 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
134 +static struct nf_hook_ops imq_ingress_ipv6 = {
138 + NF_IP6_PRE_ROUTING,
139 + NF_IP6_PRI_MANGLE + 1
142 +static struct nf_hook_ops imq_egress_ipv6 = {
146 + NF_IP6_POST_ROUTING,
151 +static unsigned int numdevs = 2;
153 +MODULE_PARM(numdevs, "i");
154 +MODULE_PARM_DESC(numdevs, "number of imq devices");
156 +static struct net_device *imq_devs;
159 +static struct net_device_stats *imq_get_stats(struct net_device *dev)
161 + return (struct net_device_stats *)dev->priv;
164 +/* called for packets kfree'd in qdiscs at places other than enqueue */
165 +static void imq_skb_destructor(struct sk_buff *skb)
167 + struct nf_info *info = skb->nf_info;
171 + dev_put(info->indev);
173 + dev_put(info->outdev);
178 +static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
180 + struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
182 + stats->tx_bytes += skb->len;
183 + stats->tx_packets++;
185 + skb->imq_flags = 0;
186 + skb->destructor = NULL;
188 + dev->trans_start = jiffies;
189 + nf_reinject(skb, skb->nf_info, NF_ACCEPT);
193 +static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info,
196 + struct net_device *dev;
197 + struct net_device_stats *stats;
198 + struct sk_buff *skb2 = NULL;
200 + unsigned int index = skb->imq_flags&IMQ_F_IFMASK;
203 + if (index > numdevs)
206 + dev = imq_devs + index;
207 + if (!(dev->flags & IFF_UP)) {
208 + skb->imq_flags = 0;
209 + nf_reinject(skb, info, NF_ACCEPT);
212 + dev->last_rx = jiffies;
214 + if (skb->destructor) {
216 + skb = skb_clone(skb, GFP_ATOMIC);
220 + skb->nf_info = info;
222 + stats = (struct net_device_stats *)dev->priv;
223 + stats->rx_bytes+= skb->len;
224 + stats->rx_packets++;
226 + spin_lock_bh(&dev->queue_lock);
229 + q->enqueue(skb_get(skb), q);
230 + if (skb_shared(skb)) {
231 + skb->destructor = imq_skb_destructor;
236 + if (spin_is_locked(&dev->xmit_lock))
237 + netif_schedule(dev);
240 + spin_unlock_bh(&dev->queue_lock);
243 + kfree_skb(ret ? skb : skb2);
248 +static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff **pskb,
249 + const struct net_device *indev,
250 + const struct net_device *outdev,
251 + int (*okfn)(struct sk_buff *))
253 + if ((*pskb)->imq_flags & IMQ_F_ENQUEUE)
260 +static int __init imq_init_hooks(void)
264 + if ((err = nf_register_queue_handler(PF_INET, imq_nf_queue, NULL)))
266 + if ((err = nf_register_hook(&imq_ingress_ipv4)))
268 + if ((err = nf_register_hook(&imq_egress_ipv4)))
270 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
271 + if ((err = nf_register_queue_handler(PF_INET6, imq_nf_queue, NULL)))
273 + if ((err = nf_register_hook(&imq_ingress_ipv6)))
275 + if ((err = nf_register_hook(&imq_egress_ipv6)))
281 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
283 + nf_unregister_hook(&imq_ingress_ipv6);
285 + nf_unregister_queue_handler(PF_INET6);
287 + nf_unregister_hook(&imq_egress_ipv4);
290 + nf_unregister_hook(&imq_ingress_ipv4);
292 + nf_unregister_queue_handler(PF_INET);
297 +static void __exit imq_unhook(void)
299 + nf_unregister_hook(&imq_ingress_ipv4);
300 + nf_unregister_hook(&imq_egress_ipv4);
301 + nf_unregister_queue_handler(PF_INET);
302 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
303 + nf_unregister_hook(&imq_ingress_ipv6);
304 + nf_unregister_hook(&imq_egress_ipv6);
305 + nf_unregister_queue_handler(PF_INET6);
309 +static int __init imq_dev_init(struct net_device *dev)
311 + dev->hard_start_xmit = imq_dev_xmit;
312 + dev->type = ARPHRD_VOID;
314 + dev->tx_queue_len = 30;
315 + dev->flags = IFF_NOARP;
316 + dev->priv = kmalloc(sizeof(struct net_device_stats), GFP_KERNEL);
317 + if (dev->priv == NULL)
319 + memset(dev->priv, 0, sizeof(struct net_device_stats));
320 + dev->get_stats = imq_get_stats;
325 +static void imq_dev_uninit(struct net_device *dev)
330 +static int __init imq_init_devs(void)
332 + struct net_device *dev;
335 + if (!numdevs || numdevs > IMQ_MAX_DEVS) {
336 + printk(KERN_ERR "numdevs has to be betweed 1 and %u\n",
341 + imq_devs = kmalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL);
344 + memset(imq_devs, 0, sizeof(struct net_device) * numdevs);
346 + /* we start counting at zero */
349 + for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
350 + SET_MODULE_OWNER(dev);
351 + strcpy(dev->name, "imq%d");
352 + dev->init = imq_dev_init;
353 + dev->uninit = imq_dev_uninit;
355 + if (register_netdev(dev) < 0)
362 + unregister_netdev(--dev);
367 +static void imq_cleanup_devs(void)
370 + struct net_device *dev = imq_devs;
372 + for (i = 0; i <= numdevs; i++)
373 + unregister_netdev(dev++);
378 +static int __init imq_init_module(void)
382 + if ((err = imq_init_devs()))
384 + if ((err = imq_init_hooks())) {
385 + imq_cleanup_devs();
389 + printk(KERN_INFO "imq driver loaded.\n");
394 +static void __exit imq_cleanup_module(void)
397 + imq_cleanup_devs();
400 +module_init(imq_init_module);
401 +module_exit(imq_cleanup_module);
402 +MODULE_LICENSE("GPL");
403 Index: linux-2.4.35.4/include/linux/imq.h
404 ===================================================================
406 +++ linux-2.4.35.4/include/linux/imq.h
411 +#define IMQ_MAX_DEVS 16
413 +#define IMQ_F_IFMASK 0x7f
414 +#define IMQ_F_ENQUEUE 0x80
417 Index: linux-2.4.35.4/include/linux/netfilter_ipv4/ipt_IMQ.h
418 ===================================================================
420 +++ linux-2.4.35.4/include/linux/netfilter_ipv4/ipt_IMQ.h
425 +struct ipt_imq_info {
426 + unsigned int todev; /* target imq device */
429 +#endif /* _IPT_IMQ_H */
430 Index: linux-2.4.35.4/include/linux/netfilter_ipv6/ip6t_IMQ.h
431 ===================================================================
433 +++ linux-2.4.35.4/include/linux/netfilter_ipv6/ip6t_IMQ.h
438 +struct ip6t_imq_info {
439 + unsigned int todev; /* target imq device */
442 +#endif /* _IP6T_IMQ_H */
443 Index: linux-2.4.35.4/include/linux/skbuff.h
444 ===================================================================
445 --- linux-2.4.35.4.orig/include/linux/skbuff.h
446 +++ linux-2.4.35.4/include/linux/skbuff.h
447 @@ -93,6 +93,9 @@ struct nf_ct_info {
448 struct nf_conntrack *master;
451 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
455 struct sk_buff_head {
456 /* These two members must be first. */
457 @@ -182,7 +185,7 @@ struct sk_buff {
458 unsigned int len; /* Length of actual data */
459 unsigned int data_len;
460 unsigned int csum; /* Checksum */
461 - unsigned char __unused, /* Dead field, may be reused */
462 + unsigned char imq_flags, /* intermediate queueing device */
463 cloned, /* head may be cloned (check refcnt to be sure). */
464 pkt_type, /* Packet class */
465 ip_summed; /* Driver fed us an IP checksum */
466 @@ -219,6 +222,9 @@ struct sk_buff {
467 #ifdef CONFIG_NET_SCHED
468 __u32 tc_index; /* traffic control index */
470 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
471 + struct nf_info *nf_info;
476 Index: linux-2.4.35.4/net/core/skbuff.c
477 ===================================================================
478 --- linux-2.4.35.4.orig/net/core/skbuff.c
479 +++ linux-2.4.35.4/net/core/skbuff.c
480 @@ -202,6 +202,10 @@ struct sk_buff *alloc_skb(unsigned int s
481 /* Set up other state */
484 +#if defined(CONFIG_IMQ) || defined (CONFIG_IMQ_MODULE)
485 + skb->imq_flags = 0;
486 + skb->nf_info = NULL;
490 atomic_set(&skb->users, 1);
491 @@ -250,6 +254,10 @@ static inline void skb_headerinit(void *
492 #ifdef CONFIG_NET_SCHED
495 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
496 + skb->imq_flags = 0;
497 + skb->nf_info = NULL;
501 static void skb_drop_fraglist(struct sk_buff *skb)
502 @@ -400,6 +408,10 @@ struct sk_buff *skb_clone(struct sk_buff
503 #ifdef CONFIG_NET_SCHED
506 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
511 atomic_inc(&(skb_shinfo(skb)->dataref));
513 @@ -444,6 +456,10 @@ static void copy_skb_header(struct sk_bu
514 #ifdef CONFIG_NET_SCHED
515 new->tc_index = old->tc_index;
517 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
518 + new->imq_flags=old->imq_flags;
519 + new->nf_info=old->nf_info;
524 Index: linux-2.4.35.4/net/ipv4/netfilter/Config.in
525 ===================================================================
526 --- linux-2.4.35.4.orig/net/ipv4/netfilter/Config.in
527 +++ linux-2.4.35.4/net/ipv4/netfilter/Config.in
528 @@ -171,6 +171,7 @@ if [ "$CONFIG_IP_NF_IPTABLES" != "n" ];
529 dep_tristate ' DSCP target support' CONFIG_IP_NF_TARGET_DSCP $CONFIG_IP_NF_MANGLE
531 dep_tristate ' MARK target support' CONFIG_IP_NF_TARGET_MARK $CONFIG_IP_NF_MANGLE
532 + dep_tristate ' IMQ target support' CONFIG_IP_NF_TARGET_IMQ $CONFIG_IP_NF_MANGLE
534 if [ "$CONFIG_IP_NF_CONNTRACK_MARK" != "n" ]; then
535 dep_tristate ' CONNMARK target support' CONFIG_IP_NF_TARGET_CONNMARK $CONFIG_IP_NF_IPTABLES
536 Index: linux-2.4.35.4/net/ipv4/netfilter/Makefile
537 ===================================================================
538 --- linux-2.4.35.4.orig/net/ipv4/netfilter/Makefile
539 +++ linux-2.4.35.4/net/ipv4/netfilter/Makefile
540 @@ -138,6 +138,7 @@ obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TO
541 obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
542 obj-$(CONFIG_IP_NF_TARGET_DSCP) += ipt_DSCP.o
543 obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o
544 +obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
545 obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
546 obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
547 obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
548 Index: linux-2.4.35.4/net/ipv4/netfilter/ipt_IMQ.c
549 ===================================================================
551 +++ linux-2.4.35.4/net/ipv4/netfilter/ipt_IMQ.c
553 +/* This target marks packets to be enqueued to an imq device */
554 +#include <linux/module.h>
555 +#include <linux/skbuff.h>
556 +#include <linux/netfilter_ipv4/ip_tables.h>
557 +#include <linux/netfilter_ipv4/ipt_IMQ.h>
558 +#include <linux/imq.h>
560 +static unsigned int imq_target(struct sk_buff **pskb,
561 + unsigned int hooknum,
562 + const struct net_device *in,
563 + const struct net_device *out,
564 + const void *targinfo,
567 + struct ipt_imq_info *mr = (struct ipt_imq_info*)targinfo;
569 + (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
570 + (*pskb)->nfcache |= NFC_ALTERED;
572 + return IPT_CONTINUE;
575 +static int imq_checkentry(const char *tablename,
576 + const struct ipt_entry *e,
578 + unsigned int targinfosize,
579 + unsigned int hook_mask)
581 + struct ipt_imq_info *mr;
583 + if (targinfosize != IPT_ALIGN(sizeof(struct ipt_imq_info))) {
584 + printk(KERN_WARNING "IMQ: invalid targinfosize\n");
587 + mr = (struct ipt_imq_info*)targinfo;
589 + if (strcmp(tablename, "mangle") != 0) {
590 + printk(KERN_WARNING
591 + "IMQ: IMQ can only be called from \"mangle\" table, not \"%s\"\n",
596 + if (mr->todev > IMQ_MAX_DEVS) {
597 + printk(KERN_WARNING
598 + "IMQ: invalid device specified, highest is %u\n",
606 +static struct ipt_target ipt_imq_reg = {
615 +static int __init init(void)
617 + if (ipt_register_target(&ipt_imq_reg))
623 +static void __exit fini(void)
625 + ipt_unregister_target(&ipt_imq_reg);
630 +MODULE_LICENSE("GPL");
631 Index: linux-2.4.35.4/net/ipv6/netfilter/Config.in
632 ===================================================================
633 --- linux-2.4.35.4.orig/net/ipv6/netfilter/Config.in
634 +++ linux-2.4.35.4/net/ipv6/netfilter/Config.in
635 @@ -72,6 +72,7 @@ if [ "$CONFIG_IP6_NF_IPTABLES" != "n" ];
636 if [ "$CONFIG_IP6_NF_MANGLE" != "n" ]; then
637 # dep_tristate ' TOS target support' CONFIG_IP6_NF_TARGET_TOS $CONFIG_IP_NF_MANGLE
638 dep_tristate ' MARK target support' CONFIG_IP6_NF_TARGET_MARK $CONFIG_IP6_NF_MANGLE
639 + dep_tristate ' IMQ target support' CONFIG_IP6_NF_TARGET_IMQ $CONFIG_IP6_NF_MANGLE
641 #dep_tristate ' LOG target support' CONFIG_IP6_NF_TARGET_LOG $CONFIG_IP6_NF_IPTABLES
643 Index: linux-2.4.35.4/net/ipv6/netfilter/Makefile
644 ===================================================================
645 --- linux-2.4.35.4.orig/net/ipv6/netfilter/Makefile
646 +++ linux-2.4.35.4/net/ipv6/netfilter/Makefile
647 @@ -29,6 +29,7 @@ obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t
648 obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
649 obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o
650 obj-$(CONFIG_IP6_NF_TARGET_MARK) += ip6t_MARK.o
651 +obj-$(CONFIG_IP6_NF_TARGET_IMQ) += ip6t_IMQ.o
652 obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
653 obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
654 obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o
655 Index: linux-2.4.35.4/net/ipv6/netfilter/ip6t_IMQ.c
656 ===================================================================
658 +++ linux-2.4.35.4/net/ipv6/netfilter/ip6t_IMQ.c
660 +/* This target marks packets to be enqueued to an imq device */
661 +#include <linux/module.h>
662 +#include <linux/skbuff.h>
663 +#include <linux/netfilter_ipv6/ip6_tables.h>
664 +#include <linux/netfilter_ipv6/ip6t_IMQ.h>
665 +#include <linux/imq.h>
667 +static unsigned int imq_target(struct sk_buff **pskb,
668 + unsigned int hooknum,
669 + const struct net_device *in,
670 + const struct net_device *out,
671 + const void *targinfo,
674 + struct ip6t_imq_info *mr = (struct ip6t_imq_info*)targinfo;
676 + (*pskb)->imq_flags = mr->todev | IMQ_F_ENQUEUE;
677 + (*pskb)->nfcache |= NFC_ALTERED;
679 + return IP6T_CONTINUE;
682 +static int imq_checkentry(const char *tablename,
683 + const struct ip6t_entry *e,
685 + unsigned int targinfosize,
686 + unsigned int hook_mask)
688 + struct ip6t_imq_info *mr;
690 + if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_imq_info))) {
691 + printk(KERN_WARNING "IMQ: invalid targinfosize\n");
694 + mr = (struct ip6t_imq_info*)targinfo;
696 + if (strcmp(tablename, "mangle") != 0) {
697 + printk(KERN_WARNING
698 + "IMQ: IMQ can only be called from \"mangle\" table, not \"%s\"\n",
703 + if (mr->todev > IMQ_MAX_DEVS) {
704 + printk(KERN_WARNING
705 + "IMQ: invalid device specified, highest is %u\n",
713 +static struct ip6t_target ip6t_imq_reg = {
722 +static int __init init(void)
724 + if (ip6t_register_target(&ip6t_imq_reg))
730 +static void __exit fini(void)
732 + ip6t_unregister_target(&ip6t_imq_reg);
737 +MODULE_LICENSE("GPL");
738 Index: linux-2.4.35.4/net/sched/sch_generic.c
739 ===================================================================
740 --- linux-2.4.35.4.orig/net/sched/sch_generic.c
741 +++ linux-2.4.35.4/net/sched/sch_generic.c
743 #include <linux/skbuff.h>
744 #include <linux/rtnetlink.h>
745 #include <linux/init.h>
746 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
747 +#include <linux/imq.h>
749 #include <linux/list.h>
750 #include <net/sock.h>
751 #include <net/pkt_sched.h>
752 @@ -90,7 +93,11 @@ int qdisc_restart(struct net_device *dev
753 spin_unlock(&dev->queue_lock);
755 if (!netif_queue_stopped(dev)) {
758 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
759 + && !(skb->imq_flags & IMQ_F_ENQUEUE)
762 dev_queue_xmit_nit(skb, dev);
764 if (dev->hard_start_xmit(skb, dev) == 0) {