[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0212767b-f654-7197-7085-4a7aa667abfd@mojatatu.com>
Date: Wed, 25 Jul 2018 07:55:06 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Daniel Borkmann <daniel@...earbox.net>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Eyal Birger <eyal.birger@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v3 1/5] tc/act: user space can't use
TC_ACT_REDIRECT directly
On 24/07/18 04:06 PM, Paolo Abeni wrote:
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -895,6 +895,11 @@ struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp,
> }
> }
>
> + if (a->tcfa_action == TC_ACT_REDIRECT) {
> + net_warn_ratelimited("TC_ACT_REDIRECT can't be used directly");
> + a->tcfa_action = TC_ACT_UNSPEC;
> + }
> +
Why not just reject the rule instead of changing the code underneath the
user?
cheers,
jamal
Powered by blists - more mailing lists