Skip to content

Commit c8ec463

Browse files
congwangdavem330
authored andcommitted
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: ef6980b ("introduce IFE action") Cc: Jamal Hadi Salim <[email protected]> Cc: Jiri Pirko <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4638faa commit c8ec463

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/sched/act_ife.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
481481
int ret = 0;
482482
int err;
483483

484+
if (!nla) {
485+
NL_SET_ERR_MSG_MOD(extack, "IFE requires attributes to be passed");
486+
return -EINVAL;
487+
}
488+
484489
err = nla_parse_nested_deprecated(tb, TCA_IFE_MAX, nla, ife_policy,
485490
NULL);
486491
if (err < 0)

0 commit comments

Comments
 (0)