Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=645a1e39e4e3e84a275c5e4a7c8049041146f9b5
Commit:     645a1e39e4e3e84a275c5e4a7c8049041146f9b5
Parent:     c6ee877f2e4c4d44c934528b4cec6c8d7f54d3ad
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 00:13:19 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:08:21 2008 -0800

    [NET_SCHED]: sch_ingress: move dependencies to Kconfig
    
    Instead of complaining at scheduler initialization time, check the
    dependencies in Kconfig.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Acked-by: Jamal Hadi Salim <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sched/Kconfig       |    1 +
 net/sched/sch_ingress.c |   11 +----------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index f5ab54b..554248e 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -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.
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index c69e7bc..b30ca01 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -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");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to