ife: error out when nla attributes are empty
Subsystems (3)
PATCH 1/1 ife: error out when nla attributes are empty
act_ife at least requires TCA_IFE_PARMS, so we have to bail out when there is no attribute passed in.
Reported-by [email protected]
Fixes ef6980b6becb ("introduce IFE action")
Cc Jamal Hadi Salim <[email protected]>
Cc Jiri Pirko <[email protected]>
Signed-off-by Cong Wang <[email protected]>
--- net/sched/act_ife.c | 5 +++++ 1 file changed, 5 insertions(+)
net/sched/act_ife.c +5 -0
@@ -481,6 +481,11 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,int ret =0 ;int err; +if (!nla) { +NL_SET_ERR_MSG_MOD (extack,"IFE requires attributes to be passed" ); +return -EINVAL ; + } + err =nla_parse_nested_deprecated (tb,TCA_IFE_MAX , nla, ife_policy,NULL );if (err <0 )
Signature · 1 line
2.21.0
David Miller
maintainerFrom: Cong Wang <[email protected]>
Date: Mon, 22 Jul 2019 21:43:00 -0700
Quoted 8 lines
act_ifeat least requiresTCA_IFE_PARMS, so we have to bail out when there is no attribute passed in.Reported-by [email protected]Fixes ef6980b6becb ("introduce IFE action")Cc Jamal Hadi Salim <[email protected]>Cc Jiri Pirko <[email protected]>Signed-off-by Cong Wang <[email protected]>
Applied and queued up for -stable.