Skip to content

Commit

Permalink
net_sched: act: pick a different type for act_xt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
WANG Cong authored and David S. Miller committed Jan 17, 2014
1 parent 7dff08b commit 6c80563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/uapi/linux/tc_act/tc_ipt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/pkt_cls.h>

#define TCA_ACT_IPT 6
#define TCA_ACT_XT 10

enum {
TCA_IPT_UNSPEC,
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static struct tc_action_ops act_ipt_ops = {
static struct tc_action_ops act_xt_ops = {
.kind = "xt",
.hinfo = &ipt_hash_info,
.type = TCA_ACT_IPT,
.type = TCA_ACT_XT,
.capab = TCA_CAP_NONE,
.owner = THIS_MODULE,
.act = tcf_ipt,
Expand Down

0 comments on commit 6c80563

Please sign in to comment.