Skip to content

Commit 1afa3cc

Browse files
dcarattidavem330
authored andcommitted
net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS
unlike other classifiers that can be offloaded (i.e. users can set flags like 'skip_hw' and 'skip_sw'), 'cls_matchall' doesn't validate the size of netlink attribute 'TCA_MATCHALL_FLAGS' provided by user: add a proper entry to mall_policy. Fixes: b87f793 ("net/sched: Add match-all classifier hw offloading.") Signed-off-by: Davide Caratti <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6ee2deb commit 1afa3cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sched/cls_matchall.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static void *mall_get(struct tcf_proto *tp, u32 handle)
157157
static const struct nla_policy mall_policy[TCA_MATCHALL_MAX + 1] = {
158158
[TCA_MATCHALL_UNSPEC] = { .type = NLA_UNSPEC },
159159
[TCA_MATCHALL_CLASSID] = { .type = NLA_U32 },
160+
[TCA_MATCHALL_FLAGS] = { .type = NLA_U32 },
160161
};
161162

162163
static int mall_set_parms(struct net *net, struct tcf_proto *tp,

0 commit comments

Comments
 (0)