aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-01-15 18:38:43 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-16 20:24:11 -0500
commit6c80563c2fdd9b32e37e2570e5b1ba9befd591c0 (patch)
tree33c4325bcc9d5795e3495f44ac445811239f29a7
parent7dff08bbda1610697a350eeb7dcdc6177d229407 (diff)
net_sched: act: pick a different type for act_xt
In tcf_register_action() we check either ->type or ->kind to see if there is an existing action registered, but ipt action registers two actions with same type but different kinds. They should have different types too. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/uapi/linux/tc_act/tc_ipt.h1
-rw-r--r--net/sched/act_ipt.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/tc_act/tc_ipt.h b/include/uapi/linux/tc_act/tc_ipt.h
index a2335563d21f..130aaadf6fac 100644
--- a/include/uapi/linux/tc_act/tc_ipt.h
+++ b/include/uapi/linux/tc_act/tc_ipt.h
@@ -4,6 +4,7 @@
4#include <linux/pkt_cls.h> 4#include <linux/pkt_cls.h>
5 5
6#define TCA_ACT_IPT 6 6#define TCA_ACT_IPT 6
7#define TCA_ACT_XT 10
7 8
8enum { 9enum {
9 TCA_IPT_UNSPEC, 10 TCA_IPT_UNSPEC,
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 484bd19601e3..bc9f498f6fef 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -298,7 +298,7 @@ static struct tc_action_ops act_ipt_ops = {
298static struct tc_action_ops act_xt_ops = { 298static struct tc_action_ops act_xt_ops = {
299 .kind = "xt", 299 .kind = "xt",
300 .hinfo = &ipt_hash_info, 300 .hinfo = &ipt_hash_info,
301 .type = TCA_ACT_IPT, 301 .type = TCA_ACT_XT,
302 .capab = TCA_CAP_NONE, 302 .capab = TCA_CAP_NONE,
303 .owner = THIS_MODULE, 303 .owner = THIS_MODULE,
304 .act = tcf_ipt, 304 .act = tcf_ipt,