Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79296
b: refs/heads/master
c: 1389356
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent c42b278 commit 99a4135
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 645a1e39e4e3e84a275c5e4a7c8049041146f9b5
refs/heads/master: 13893567358a8426d03ac3c613befc55431f23ce
16 changes: 4 additions & 12 deletions trunk/net/sched/sch_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@


/* Thanks to Doron Oz for this hack */
#ifndef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NETFILTER
#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
static int nf_registered;
#endif
#endif

struct ingress_qdisc_data {
struct tcf_proto *filter_list;
Expand Down Expand Up @@ -118,8 +116,7 @@ static int ingress_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return result;
}

#ifndef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NETFILTER
#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
static unsigned int ing_hook(unsigned int hook, struct sk_buff *skb,
const struct net_device *indev,
const struct net_device *outdev,
Expand Down Expand Up @@ -158,12 +155,10 @@ static struct nf_hook_ops ing_ops[] __read_mostly = {
},
};
#endif
#endif

static int ingress_init(struct Qdisc *sch, struct rtattr *opt)
{
#ifndef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NETFILTER
#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
printk("Ingress scheduler: Classifier actions prefered over netfilter\n");

if (!nf_registered) {
Expand All @@ -173,7 +168,6 @@ static int ingress_init(struct Qdisc *sch, struct rtattr *opt)
}
nf_registered++;
}
#endif
#endif
return 0;
}
Expand Down Expand Up @@ -240,12 +234,10 @@ static int __init ingress_module_init(void)
static void __exit ingress_module_exit(void)
{
unregister_qdisc(&ingress_qdisc_ops);
#ifndef CONFIG_NET_CLS_ACT
#ifdef CONFIG_NETFILTER
#if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER)
if (nf_registered)
nf_unregister_hooks(ing_ops, ARRAY_SIZE(ing_ops));
#endif
#endif
}

module_init(ingress_module_init)
Expand Down

0 comments on commit 99a4135

Please sign in to comment.