From: WANG Cong Date: Wed, 15 Jan 2014 23:38:43 +0000 (-0800) Subject: net_sched: act: pick a different type for act_xt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c80563c2fdd9b32e37e2570e5b1ba9befd591c0;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- 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 @@ #include #define TCA_ACT_IPT 6 +#define TCA_ACT_XT 10 enum { 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 = { 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,