Skip to content

Commit e2debf0

Browse files
dcarattidavem330
authored andcommitted
net/sched: flower: add missing validation of TCA_FLOWER_FLAGS
unlike other classifiers that can be offloaded (i.e. users can set flags like 'skip_hw' and 'skip_sw'), 'cls_flower' doesn't validate the size of netlink attribute 'TCA_FLOWER_FLAGS' provided by user: add a proper entry to fl_policy. Fixes: 5b33f48 ("net/flower: Introduce hardware offload support") Signed-off-by: Davide Caratti <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1afa3cc commit e2debf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sched/cls_flower.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ static const struct nla_policy fl_policy[TCA_FLOWER_MAX + 1] = {
691691
.len = 128 / BITS_PER_BYTE },
692692
[TCA_FLOWER_KEY_CT_LABELS_MASK] = { .type = NLA_BINARY,
693693
.len = 128 / BITS_PER_BYTE },
694+
[TCA_FLOWER_FLAGS] = { .type = NLA_U32 },
694695
};
695696

696697
static const struct nla_policy

0 commit comments

Comments
 (0)