2 +++ b/drivers/net/imq.c
5 + * Pseudo-driver for the intermediate queue device.
7 + * This program is free software; you can redistribute it and/or
8 + * modify it under the terms of the GNU General Public License
9 + * as published by the Free Software Foundation; either version
10 + * 2 of the License, or (at your option) any later version.
12 + * Authors: Patrick McHardy, <kaber@trash.net>
14 + * The first version was written by Martin Devera, <devik@cdi.cz>
16 + * Credits: Jan Rafaj <imq2t@cedric.vabo.cz>
17 + * - Update patch to 2.4.21
18 + * Sebastian Strollo <sstrollo@nortelnetworks.com>
19 + * - Fix "Dead-loop on netdevice imq"-issue
20 + * Marcel Sebek <sebek64@post.cz>
21 + * - Update to 2.6.2-rc1
23 + * After some time of inactivity there is a group taking care
24 + * of IMQ again: http://www.linuximq.net
27 + * 2004/06/30 - New version of IMQ patch to kernels <=2.6.7 including
28 + * the following changes:
30 + * - Correction of ipv6 support "+"s issue (Hasso Tepper)
31 + * - Correction of imq_init_devs() issue that resulted in
32 + * kernel OOPS unloading IMQ as module (Norbert Buchmuller)
33 + * - Addition of functionality to choose number of IMQ devices
34 + * during kernel config (Andre Correa)
35 + * - Addition of functionality to choose how IMQ hooks on
36 + * PRE and POSTROUTING (after or before NAT) (Andre Correa)
37 + * - Cosmetic corrections (Norbert Buchmuller) (Andre Correa)
40 + * 2005/12/16 - IMQ versions between 2.6.7 and 2.6.13 were
41 + * released with almost no problems. 2.6.14-x was released
42 + * with some important changes: nfcache was removed; After
43 + * some weeks of trouble we figured out that some IMQ fields
44 + * in skb were missing in skbuff.c - skb_clone and copy_skb_header.
45 + * These functions are correctly patched by this new patch version.
47 + * Thanks for all who helped to figure out all the problems with
48 + * 2.6.14.x: Patrick McHardy, Rune Kock, VeNoMouS, Max CtRiX,
49 + * Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
50 + * I didn't forget anybody). I apologize again for my lack of time.
52 + * More info at: http://www.linuximq.net/ (Andre Correa)
55 +#include <linux/module.h>
56 +#include <linux/kernel.h>
57 +#include <linux/moduleparam.h>
58 +#include <linux/skbuff.h>
59 +#include <linux/netdevice.h>
60 +#include <linux/rtnetlink.h>
61 +#include <linux/if_arp.h>
62 +#include <linux/netfilter.h>
63 +#include <linux/netfilter_ipv4.h>
64 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
65 + #include <linux/netfilter_ipv6.h>
67 +#include <linux/imq.h>
68 +#include <net/pkt_sched.h>
69 +#include <net/netfilter/nf_queue.h>
71 +extern int qdisc_restart1(struct net_device *dev);
73 +static nf_hookfn imq_nf_hook;
75 +static struct nf_hook_ops imq_ingress_ipv4 = {
76 + .hook = imq_nf_hook,
77 + .owner = THIS_MODULE,
79 + .hooknum = NF_INET_PRE_ROUTING,
80 +#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
81 + .priority = NF_IP_PRI_MANGLE + 1
83 + .priority = NF_IP_PRI_NAT_DST + 1
87 +static struct nf_hook_ops imq_egress_ipv4 = {
88 + .hook = imq_nf_hook,
89 + .owner = THIS_MODULE,
91 + .hooknum = NF_INET_POST_ROUTING,
92 +#if defined(CONFIG_IMQ_BEHAVIOR_AA) || defined(CONFIG_IMQ_BEHAVIOR_BA)
93 + .priority = NF_IP_PRI_LAST
95 + .priority = NF_IP_PRI_NAT_SRC - 1
99 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
100 +static struct nf_hook_ops imq_ingress_ipv6 = {
101 + .hook = imq_nf_hook,
102 + .owner = THIS_MODULE,
104 + .hooknum = NF_INET_PRE_ROUTING,
105 +#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
106 + .priority = NF_IP6_PRI_MANGLE + 1
108 + .priority = NF_IP6_PRI_NAT_DST + 1
112 +static struct nf_hook_ops imq_egress_ipv6 = {
113 + .hook = imq_nf_hook,
114 + .owner = THIS_MODULE,
116 + .hooknum = NF_INET_POST_ROUTING,
117 +#if defined(CONFIG_IMQ_BEHAVIOR_AA) || defined(CONFIG_IMQ_BEHAVIOR_BA)
118 + .priority = NF_IP6_PRI_LAST
120 + .priority = NF_IP6_PRI_NAT_SRC - 1
125 +#if defined(CONFIG_IMQ_NUM_DEVS)
126 +static unsigned int numdevs = CONFIG_IMQ_NUM_DEVS;
128 +static unsigned int numdevs = 16;
131 +static struct net_device *imq_devs;
133 +static struct net_device_stats *imq_get_stats(struct net_device *dev)
135 + return (struct net_device_stats *)dev->priv;
138 +/* called for packets kfree'd in qdiscs at places other than enqueue */
139 +static void imq_skb_destructor(struct sk_buff *skb)
141 + struct nf_queue_entry *info = skb->nf_queue_entry;
145 + dev_put(info->indev);
147 + dev_put(info->outdev);
152 +static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
154 + struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
156 + stats->tx_bytes += skb->len;
157 + stats->tx_packets++;
159 + skb->imq_flags = 0;
160 + skb->destructor = NULL;
162 + dev->trans_start = jiffies;
163 + nf_reinject(skb->nf_queue_entry, NF_ACCEPT);
167 +static int imq_nf_queue(struct nf_queue_entry *info, unsigned queue_num)
169 + struct net_device *dev;
170 + struct net_device_stats *stats;
171 + struct sk_buff *skb2 = NULL;
173 + unsigned int index = info->skb->imq_flags&IMQ_F_IFMASK;
176 + if (index > numdevs)
179 + dev = imq_devs + index;
180 + if (!(dev->flags & IFF_UP)) {
181 + info->skb->imq_flags = 0;
182 + nf_reinject(info, NF_ACCEPT);
185 + dev->last_rx = jiffies;
187 + if (info->skb->destructor) {
189 + info->skb = skb_clone(info->skb, GFP_ATOMIC);
193 + info->skb->nf_queue_entry = info;
195 + stats = (struct net_device_stats *)dev->priv;
196 + stats->rx_bytes+= info->skb->len;
197 + stats->rx_packets++;
199 + spin_lock_bh(&dev->queue_lock);
202 + q->enqueue(skb_get(info->skb), q);
203 + if (skb_shared(info->skb)) {
204 + info->skb->destructor = imq_skb_destructor;
205 + kfree_skb(info->skb);
209 + if (spin_is_locked(&dev->_xmit_lock))
210 + netif_schedule(dev);
212 + while (!netif_queue_stopped(dev) && qdisc_restart1(dev) < 0)
215 + spin_unlock_bh(&dev->queue_lock);
218 + kfree_skb(ret ? info->skb : skb2);
223 +static struct nf_queue_handler nfqh = {
225 + .outfn = imq_nf_queue,
228 +static unsigned int imq_nf_hook(unsigned int hook, struct sk_buff *pskb,
229 + const struct net_device *indev,
230 + const struct net_device *outdev,
231 + int (*okfn)(struct sk_buff *))
233 + if (pskb->imq_flags & IMQ_F_ENQUEUE)
240 +static int __init imq_init_hooks(void)
244 + err = nf_register_queue_handler(PF_INET, &nfqh);
247 + if ((err = nf_register_hook(&imq_ingress_ipv4)))
249 + if ((err = nf_register_hook(&imq_egress_ipv4)))
251 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
252 + if ((err = nf_register_queue_handler(PF_INET6, &nfqh)))
254 + if ((err = nf_register_hook(&imq_ingress_ipv6)))
256 + if ((err = nf_register_hook(&imq_egress_ipv6)))
262 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
264 + nf_unregister_hook(&imq_ingress_ipv6);
266 + nf_unregister_queue_handler(PF_INET6, &nfqh);
268 + nf_unregister_hook(&imq_egress_ipv4);
271 + nf_unregister_hook(&imq_ingress_ipv4);
273 + nf_unregister_queue_handler(PF_INET, &nfqh);
278 +static void __exit imq_unhook(void)
280 +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
281 + nf_unregister_hook(&imq_ingress_ipv6);
282 + nf_unregister_hook(&imq_egress_ipv6);
283 + nf_unregister_queue_handler(PF_INET6, &nfqh);
285 + nf_unregister_hook(&imq_ingress_ipv4);
286 + nf_unregister_hook(&imq_egress_ipv4);
287 + nf_unregister_queue_handler(PF_INET, &nfqh);
290 +static int __init imq_dev_init(struct net_device *dev)
292 + dev->hard_start_xmit = imq_dev_xmit;
293 + dev->type = ARPHRD_VOID;
295 + dev->tx_queue_len = 11000;
296 + dev->flags = IFF_NOARP;
297 + dev->priv = kzalloc(sizeof(struct net_device_stats), GFP_KERNEL);
298 + if (dev->priv == NULL)
300 + dev->get_stats = imq_get_stats;
305 +static void imq_dev_uninit(struct net_device *dev)
310 +static int __init imq_init_devs(struct net *net)
312 + struct net_device *dev;
316 + if (!numdevs || numdevs > IMQ_MAX_DEVS) {
317 + printk(KERN_ERR "IMQ: numdevs has to be betweed 1 and %u\n",
322 + imq_devs = kzalloc(sizeof(struct net_device) * numdevs, GFP_KERNEL);
326 + /* we start counting at zero */
329 + for (i = 0, dev = imq_devs; i <= numdevs; i++, dev++) {
330 + strcpy(dev->name, "imq%d");
331 + dev->init = imq_dev_init;
332 + dev->uninit = imq_dev_uninit;
335 + if (register_netdev(dev) < 0)
338 + printk(KERN_INFO "IMQ starting with %u devices...\n", j);
343 + unregister_netdev(--dev);
348 +static void imq_cleanup_devs(void)
351 + struct net_device *dev = imq_devs;
353 + for (i = 0; i <= numdevs; i++)
354 + unregister_netdev(dev++);
359 +static __net_init int imq_init_module(struct net *net)
363 + if ((err = imq_init_devs(net))) {
364 + printk(KERN_ERR "IMQ: Error trying imq_init_devs(net)\n");
367 + if ((err = imq_init_hooks())) {
368 + printk(KERN_ERR "IMQ: Error trying imq_init_hooks()\n");
369 + imq_cleanup_devs();
373 + printk(KERN_INFO "IMQ driver loaded successfully.\n");
375 +#if defined(CONFIG_IMQ_BEHAVIOR_BA) || defined(CONFIG_IMQ_BEHAVIOR_BB)
376 + printk(KERN_INFO "\tHooking IMQ before NAT on PREROUTING.\n");
378 + printk(KERN_INFO "\tHooking IMQ after NAT on PREROUTING.\n");
380 +#if defined(CONFIG_IMQ_BEHAVIOR_AB) || defined(CONFIG_IMQ_BEHAVIOR_BB)
381 + printk(KERN_INFO "\tHooking IMQ before NAT on POSTROUTING.\n");
383 + printk(KERN_INFO "\tHooking IMQ after NAT on POSTROUTING.\n");
389 +static __net_exit void imq_exit_module(struct net *net)
392 + imq_cleanup_devs();
393 + printk(KERN_INFO "IMQ driver unloaded successfully.\n");
396 +static struct pernet_operations __net_initdata imq_net_ops = {
397 + .init = imq_init_module,
398 + .exit = imq_exit_module,
401 +static int __init imq_init(void)
403 + return register_pernet_device(&imq_net_ops);
406 +module_init(imq_init);
407 +//module_exit(imq_cleanup_module);
409 +module_param(numdevs, int, 0);
410 +MODULE_PARM_DESC(numdevs, "number of IMQ devices (how many imq* devices will be created)");
411 +MODULE_AUTHOR("http://www.linuximq.net");
412 +MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
413 +MODULE_LICENSE("GPL");
414 --- a/drivers/net/Kconfig
415 +++ b/drivers/net/Kconfig
416 @@ -117,6 +117,129 @@
417 To compile this driver as a module, choose M here: the module
418 will be called eql. If unsure, say N.
421 + tristate "IMQ (intermediate queueing device) support"
422 + depends on NETDEVICES && NETFILTER
424 + The IMQ device(s) is used as placeholder for QoS queueing
425 + disciplines. Every packet entering/leaving the IP stack can be
426 + directed through the IMQ device where it's enqueued/dequeued to the
427 + attached qdisc. This allows you to treat network devices as classes
428 + and distribute bandwidth among them. Iptables is used to specify
429 + through which IMQ device, if any, packets travel.
431 + More information at: http://www.linuximq.net/
433 + To compile this driver as a module, choose M here: the module
434 + will be called imq. If unsure, say N.
437 + prompt "IMQ behavior (PRE/POSTROUTING)"
439 + default IMQ_BEHAVIOR_BB
442 + This settings defines how IMQ behaves in respect to its
443 + hooking in PREROUTING and POSTROUTING.
445 + IMQ can work in any of the following ways:
447 + PREROUTING | POSTROUTING
448 + -----------------|-------------------
449 + #1 After NAT | After NAT
450 + #2 After NAT | Before NAT
451 + #3 Before NAT | After NAT
452 + #4 Before NAT | Before NAT
454 + The default behavior is to hook before NAT on PREROUTING
455 + and after NAT on POSTROUTING (#3).
457 + This settings are specially usefull when trying to use IMQ
458 + to shape NATed clients.
460 + More information can be found at: www.linuximq.net
462 + If not sure leave the default settings alone.
464 +config IMQ_BEHAVIOR_AA
467 + This settings defines how IMQ behaves in respect to its
468 + hooking in PREROUTING and POSTROUTING.
470 + Choosing this option will make IMQ hook like this:
472 + PREROUTING: After NAT
473 + POSTROUTING: After NAT
475 + More information can be found at: www.linuximq.net
477 + If not sure leave the default settings alone.
479 +config IMQ_BEHAVIOR_AB
482 + This settings defines how IMQ behaves in respect to its
483 + hooking in PREROUTING and POSTROUTING.
485 + Choosing this option will make IMQ hook like this:
487 + PREROUTING: After NAT
488 + POSTROUTING: Before NAT
490 + More information can be found at: www.linuximq.net
492 + If not sure leave the default settings alone.
494 +config IMQ_BEHAVIOR_BA
497 + This settings defines how IMQ behaves in respect to its
498 + hooking in PREROUTING and POSTROUTING.
500 + Choosing this option will make IMQ hook like this:
502 + PREROUTING: Before NAT
503 + POSTROUTING: After NAT
505 + More information can be found at: www.linuximq.net
507 + If not sure leave the default settings alone.
509 +config IMQ_BEHAVIOR_BB
512 + This settings defines how IMQ behaves in respect to its
513 + hooking in PREROUTING and POSTROUTING.
515 + Choosing this option will make IMQ hook like this:
517 + PREROUTING: Before NAT
518 + POSTROUTING: Before NAT
520 + More information can be found at: www.linuximq.net
522 + If not sure leave the default settings alone.
528 + int "Number of IMQ devices"
534 + This settings defines how many IMQ devices will be
537 + The default value is 16.
539 + More information can be found at: www.linuximq.net
541 + If not sure leave the default settings alone.
544 tristate "Universal TUN/TAP device driver support"
546 --- a/drivers/net/Makefile
547 +++ b/drivers/net/Makefile
549 obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o
551 obj-$(CONFIG_DUMMY) += dummy.o
552 +obj-$(CONFIG_IMQ) += imq.o
553 obj-$(CONFIG_IFB) += ifb.o
554 obj-$(CONFIG_MACVLAN) += macvlan.o
555 obj-$(CONFIG_DE600) += de600.o
557 +++ b/include/linux/imq.h
562 +#define IMQ_MAX_DEVS 16
564 +#define IMQ_F_IFMASK 0x7f
565 +#define IMQ_F_ENQUEUE 0x80
569 +++ b/include/linux/netfilter_ipv4/ipt_IMQ.h
574 +struct ipt_imq_info {
575 + unsigned int todev; /* target imq device */
578 +#endif /* _IPT_IMQ_H */
580 +++ b/include/linux/netfilter_ipv6/ip6t_IMQ.h
585 +struct ip6t_imq_info {
586 + unsigned int todev; /* target imq device */
589 +#endif /* _IP6T_IMQ_H */
590 --- a/include/linux/skbuff.h
591 +++ b/include/linux/skbuff.h
593 struct nf_conntrack *nfct;
594 struct sk_buff *nfct_reasm;
596 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
597 + unsigned char imq_flags;
598 + struct nf_queue_entry *nf_queue_entry;
600 #ifdef CONFIG_BRIDGE_NETFILTER
601 struct nf_bridge_info *nf_bridge;
603 @@ -1736,6 +1740,10 @@
604 dst->nfct_reasm = src->nfct_reasm;
605 nf_conntrack_get_reasm(src->nfct_reasm);
607 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
608 + dst->imq_flags = src->imq_flags;
609 + dst->nf_queue_entry = src->nf_queue_entry;
611 #ifdef CONFIG_BRIDGE_NETFILTER
612 dst->nf_bridge = src->nf_bridge;
613 nf_bridge_get(src->nf_bridge);
617 #include <net/net_namespace.h>
618 #include <net/sock.h>
619 #include <linux/rtnetlink.h>
620 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
621 +#include <linux/imq.h>
623 #include <linux/proc_fs.h>
624 #include <linux/seq_file.h>
625 #include <linux/stat.h>
626 @@ -1537,7 +1540,11 @@
627 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
629 if (likely(!skb->next)) {
630 - if (!list_empty(&ptype_all))
631 + if (!list_empty(&ptype_all)
632 +#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
633 + && !(skb->imq_flags & IMQ_F_ENQUEUE)
636 dev_queue_xmit_nit(skb, dev);
638 if (netif_needs_gso(dev, skb)) {
640 +++ b/net/ipv4/netfilter/ipt_IMQ.c
643 + * This target marks packets to be enqueued to an imq device
645 +#include <linux/module.h>
646 +#include <linux/skbuff.h>
647 +#include <linux/netfilter_ipv4/ip_tables.h>
648 +#include <linux/netfilter_ipv4/ipt_IMQ.h>
649 +#include <linux/imq.h>
651 +static unsigned int imq_target(struct sk_buff *pskb,
652 + const struct net_device *in,
653 + const struct net_device *out,
654 + unsigned int hooknum,
655 + const struct xt_target *target,
656 + const void *targinfo)
658 + struct ipt_imq_info *mr = (struct ipt_imq_info*)targinfo;
660 + pskb->imq_flags = mr->todev | IMQ_F_ENQUEUE;
662 + return XT_CONTINUE;
665 +static bool imq_checkentry(const char *tablename,
667 + const struct xt_target *target,
669 + unsigned int hook_mask)
671 + struct ipt_imq_info *mr;
673 + mr = (struct ipt_imq_info*)targinfo;
675 + if (mr->todev > IMQ_MAX_DEVS) {
676 + printk(KERN_WARNING
677 + "IMQ: invalid device specified, highest is %u\n",
685 +static struct xt_target ipt_imq_reg = {
688 + .target = imq_target,
689 + .targetsize = sizeof(struct ipt_imq_info),
690 + .checkentry = imq_checkentry,
695 +static int __init init(void)
697 + return xt_register_target(&ipt_imq_reg);
700 +static void __exit fini(void)
702 + xt_unregister_target(&ipt_imq_reg);
708 +MODULE_AUTHOR("http://www.linuximq.net");
709 +MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
710 +MODULE_LICENSE("GPL");
711 --- a/net/ipv4/netfilter/Kconfig
712 +++ b/net/ipv4/netfilter/Kconfig
715 To compile it as a module, choose M here. If unsure, say N.
717 +config IP_NF_TARGET_IMQ
718 + tristate "IMQ target support"
719 + depends on IP_NF_MANGLE && IMQ
721 + This option adds a `IMQ' target which is used to specify if and
722 + to which IMQ device packets should get enqueued/dequeued.
724 + For more information visit: http://www.linuximq.net/
726 + To compile it as a module, choose M here. If unsure, say N.
728 config IP_NF_TARGET_REJECT
729 tristate "REJECT target support"
730 depends on IP_NF_FILTER
731 --- a/net/ipv4/netfilter/Makefile
732 +++ b/net/ipv4/netfilter/Makefile
734 obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
735 obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
736 obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o
737 +obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
738 obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
739 obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
740 obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
742 +++ b/net/ipv6/netfilter/ip6t_IMQ.c
745 + * This target marks packets to be enqueued to an imq device
747 +#include <linux/module.h>
748 +#include <linux/skbuff.h>
749 +#include <linux/netfilter_ipv6/ip6_tables.h>
750 +#include <linux/netfilter_ipv6/ip6t_IMQ.h>
751 +#include <linux/imq.h>
753 +static unsigned int imq_target(struct sk_buff *pskb,
754 + const struct net_device *in,
755 + const struct net_device *out,
756 + unsigned int hooknum,
757 + const struct xt_target *target,
758 + const void *targinfo)
760 + struct ip6t_imq_info *mr = (struct ip6t_imq_info*)targinfo;
762 + pskb->imq_flags = mr->todev | IMQ_F_ENQUEUE;
764 + return XT_CONTINUE;
767 +static bool imq_checkentry(const char *tablename,
769 + const struct xt_target *target,
771 + unsigned int hook_mask)
773 + struct ip6t_imq_info *mr;
775 + mr = (struct ip6t_imq_info*)targinfo;
777 + if (mr->todev > IMQ_MAX_DEVS) {
778 + printk(KERN_WARNING
779 + "IMQ: invalid device specified, highest is %u\n",
787 +static struct xt_target ip6t_imq_reg = {
789 + .family = AF_INET6,
790 + .target = imq_target,
791 + .targetsize = sizeof(struct ip6t_imq_info),
793 + .checkentry = imq_checkentry,
797 +static int __init init(void)
799 + return xt_register_target(&ip6t_imq_reg);
802 +static void __exit fini(void)
804 + xt_unregister_target(&ip6t_imq_reg);
810 +MODULE_AUTHOR("http://www.linuximq.net");
811 +MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
812 +MODULE_LICENSE("GPL");
813 --- a/net/ipv6/netfilter/Kconfig
814 +++ b/net/ipv6/netfilter/Kconfig
817 To compile it as a module, choose M here. If unsure, say N.
819 +config IP6_NF_TARGET_IMQ
820 + tristate "IMQ target support"
821 + depends on IP6_NF_MANGLE && IMQ
823 + This option adds a `IMQ' target which is used to specify if and
824 + to which imq device packets should get enqueued/dequeued.
826 + To compile it as a module, choose M here. If unsure, say N.
828 config IP6_NF_TARGET_HL
829 tristate 'HL (hoplimit) target support'
830 depends on IP6_NF_MANGLE
831 --- a/net/ipv6/netfilter/Makefile
832 +++ b/net/ipv6/netfilter/Makefile
834 obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
835 obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
836 obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o
837 +obj-$(CONFIG_IP6_NF_TARGET_IMQ) += ip6t_IMQ.o
838 obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
839 obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
841 --- a/net/sched/sch_generic.c
842 +++ b/net/sched/sch_generic.c
847 +int qdisc_restart1(struct net_device *dev)
849 + return qdisc_restart(dev);
851 +EXPORT_SYMBOL(qdisc_restart1);
853 void __qdisc_run(struct net_device *dev)
855 unsigned long start_time = jiffies;