提交 645a1e39 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NET_SCHED]: sch_ingress: move dependencies to Kconfig

Instead of complaining at scheduler initialization time, check the
dependencies in Kconfig.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Acked-by: NJamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c6ee877f
......@@ -198,6 +198,7 @@ config NET_SCH_NETEM
config NET_SCH_INGRESS
tristate "Ingress Qdisc"
depends on NET_CLS_ACT || NETFILTER
---help---
Say Y here if you want to use classifiers for incoming packets.
If unsure, say Y.
......
......@@ -162,19 +162,10 @@ static struct nf_hook_ops ing_ops[] __read_mostly = {
static int ingress_init(struct Qdisc *sch, struct rtattr *opt)
{
/* Make sure either netfilter or preferably CLS_ACT is
* compiled in */
#ifndef CONFIG_NET_CLS_ACT
#ifndef CONFIG_NETFILTER
printk("You MUST compile classifier actions into the kernel\n");
return -EINVAL;
#else
#ifdef CONFIG_NETFILTER
printk("Ingress scheduler: Classifier actions prefered over netfilter\n");
#endif
#endif
#ifndef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NETFILTER
if (!nf_registered) {
if (nf_register_hooks(ing_ops, ARRAY_SIZE(ing_ops)) < 0) {
printk("ingress qdisc registration error \n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册