* [Patch net-next] net_sched: act: pick a different type for act_xt
@ 2014-01-15 23:38 Cong Wang
2014-01-16 13:28 ` Jamal Hadi Salim
2014-01-17 1:24 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2014-01-15 23:38 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, Jamal Hadi Salim, David S. Miller
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>
---
include/uapi/linux/tc_act/tc_ipt.h | 1 +
net/sched/act_ipt.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/tc_act/tc_ipt.h b/include/uapi/linux/tc_act/tc_ipt.h
index a233556..130aaad 100644
--- a/include/uapi/linux/tc_act/tc_ipt.h
+++ b/include/uapi/linux/tc_act/tc_ipt.h
@@ -4,6 +4,7 @@
#include <linux/pkt_cls.h>
#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 484bd19..bc9f498 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,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Patch net-next] net_sched: act: pick a different type for act_xt
2014-01-15 23:38 [Patch net-next] net_sched: act: pick a different type for act_xt Cong Wang
@ 2014-01-16 13:28 ` Jamal Hadi Salim
2014-01-17 1:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jamal Hadi Salim @ 2014-01-16 13:28 UTC (permalink / raw)
To: Cong Wang, netdev; +Cc: David S. Miller
On 01/15/14 18:38, Cong Wang wrote:
> 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>
cheers,
jamal
> ---
> include/uapi/linux/tc_act/tc_ipt.h | 1 +
> net/sched/act_ipt.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/tc_act/tc_ipt.h b/include/uapi/linux/tc_act/tc_ipt.h
> index a233556..130aaad 100644
> --- a/include/uapi/linux/tc_act/tc_ipt.h
> +++ b/include/uapi/linux/tc_act/tc_ipt.h
> @@ -4,6 +4,7 @@
> #include <linux/pkt_cls.h>
>
> #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 484bd19..bc9f498 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,
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Patch net-next] net_sched: act: pick a different type for act_xt
2014-01-15 23:38 [Patch net-next] net_sched: act: pick a different type for act_xt Cong Wang
2014-01-16 13:28 ` Jamal Hadi Salim
@ 2014-01-17 1:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-01-17 1:24 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, jhs
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 15 Jan 2014 15:38:43 -0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-17 1:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15 23:38 [Patch net-next] net_sched: act: pick a different type for act_xt Cong Wang
2014-01-16 13:28 ` Jamal Hadi Salim
2014-01-17 1:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).