@@ -106,7 +106,7 @@ typedef void (*tc_action_priv_destructor)(void *priv);
struct tc_action_ops {
struct list_head head;
struct list_head p4_head;
- char kind[IFNAMSIZ];
+ char kind[ACTNAMSIZ];
enum tca_id id; /* identifier should match kind */
unsigned int net_id;
size_t size;
@@ -6,6 +6,7 @@
#include <linux/pkt_sched.h>
#define TC_COOKIE_MAX_SIZE 16
+#define ACTNAMSIZ 64
/* Action attributes */
enum {
@@ -476,7 +476,7 @@ static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
rcu_read_unlock();
return nla_total_size(0) /* action number nested */
- + nla_total_size(IFNAMSIZ) /* TCA_ACT_KIND */
+ + nla_total_size(ACTNAMSIZ) /* TCA_ACT_KIND */
+ cookie_len /* TCA_ACT_COOKIE */
+ nla_total_size(sizeof(struct nla_bitfield32)) /* TCA_ACT_HW_STATS */
+ nla_total_size(0) /* TCA_ACT_STATS nested */
@@ -1393,7 +1393,7 @@ struct tc_action_ops *tc_action_load_ops(struct net *net, struct nlattr *nla,
{
struct nlattr *tb[TCA_ACT_MAX + 1];
struct tc_action_ops *a_o;
- char act_name[IFNAMSIZ];
+ char act_name[ACTNAMSIZ];
struct nlattr *kind;
int err;
@@ -1408,7 +1408,7 @@ struct tc_action_ops *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);
}