On 7/11/20 3:28 PM, Ariel Levkovich wrote: > @@ -156,6 +173,17 @@ static int tcf_skbedit_init(struct net *net, struct > nlattr *nla, > flags |= SKBEDIT_F_INHERITDSFIELD; > } > > + if (tb[TCA_SKBEDIT_HASH] != NULL) { > + hash_alg = nla_get_u32(tb[TCA_SKBEDIT_HASH]); > + if (hash_alg > TCA_SKBEDIT_HASH_ALG_ASYM_L4) > + return -EINVAL;
tcf_skbedit_init has an extack argument, so fill in a message stating why it is failing EINVAL.