Re: [PATCH v10 net-next 02/15] net/sched: act_api: increase action kind string length

From
Marcelo Ricardo Leitner <hidden>
Date
2024-02-01 13:16:50
Also in
bpf
Reply to
Jamal Hadi Salim, 2024-01-22
On Mon, Jan 22, 2024 at 02:47:48PM -0500, Jamal Hadi Salim wrote:
quoted hunk ↗ jump to hunk
@@ -1439,7 +1439,7 @@ tc_action_load_ops(struct net *net, struct nlattr *nla,
 			NL_SET_ERR_MSG(extack, "TC action kind must be specified");
 			return ERR_PTR(err);
 		}
-		if (nla_strscpy(act_name, kind, IFNAMSIZ) < 0) {
+		if (nla_strscpy(act_name, kind, ACTNAMSIZ) < 0) {
 			NL_SET_ERR_MSG(extack, "TC action name too long");
 			return ERR_PTR(err);
 		}
Subsquent lines here are:
        } else {
                if (strscpy(act_name, "police", IFNAMSIZ) < 0) {
		                                ^^^^^^^^
                        NL_SET_ERR_MSG(extack, "TC action name too long");

I know it won't make a difference in the end but it would be nice to
keep it consistent.
Thread (41 messages) 41 messages, 3 authors, last reply 2024-02-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help