File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -710,9 +710,11 @@ enum {
710
710
TCA_FLOWER_KEY_CFM_OPT_UNSPEC ,
711
711
TCA_FLOWER_KEY_CFM_MD_LEVEL ,
712
712
TCA_FLOWER_KEY_CFM_OPCODE ,
713
- TCA_FLOWER_KEY_CFM_OPT_MAX ,
713
+ __TCA_FLOWER_KEY_CFM_OPT_MAX ,
714
714
};
715
715
716
+ #define TCA_FLOWER_KEY_CFM_OPT_MAX (__TCA_FLOWER_KEY_CFM_OPT_MAX - 1)
717
+
716
718
#define TCA_FLOWER_MASK_FLAGS_RANGE (1 << 0) /* Range-based match */
717
719
718
720
/* Match-all classifier */
Original file line number Diff line number Diff line change @@ -776,7 +776,8 @@ mpls_stack_entry_policy[TCA_FLOWER_KEY_MPLS_OPT_LSE_MAX + 1] = {
776
776
[TCA_FLOWER_KEY_MPLS_OPT_LSE_LABEL ] = { .type = NLA_U32 },
777
777
};
778
778
779
- static const struct nla_policy cfm_opt_policy [TCA_FLOWER_KEY_CFM_OPT_MAX ] = {
779
+ static const struct nla_policy
780
+ cfm_opt_policy [TCA_FLOWER_KEY_CFM_OPT_MAX + 1 ] = {
780
781
[TCA_FLOWER_KEY_CFM_MD_LEVEL ] = NLA_POLICY_MAX (NLA_U8 ,
781
782
FLOW_DIS_CFM_MDL_MAX ),
782
783
[TCA_FLOWER_KEY_CFM_OPCODE ] = { .type = NLA_U8 },
@@ -1709,7 +1710,7 @@ static int fl_set_key_cfm(struct nlattr **tb,
1709
1710
struct fl_flow_key * mask ,
1710
1711
struct netlink_ext_ack * extack )
1711
1712
{
1712
- struct nlattr * nla_cfm_opt [TCA_FLOWER_KEY_CFM_OPT_MAX ];
1713
+ struct nlattr * nla_cfm_opt [TCA_FLOWER_KEY_CFM_OPT_MAX + 1 ];
1713
1714
int err ;
1714
1715
1715
1716
if (!tb [TCA_FLOWER_KEY_CFM ])
You can’t perform that action at this time.
0 commit comments