netlink: set attribute size of IFLA_STATS and IFLA_STATS64

This commit is contained in:
Yu Watanabe
2019-06-01 10:24:47 +09:00
parent 90e29fe1a5
commit c095e5b02b
+6 -2
View File
@@ -519,7 +519,9 @@ static const NLType rtnl_link_types[] = {
[IFLA_LINK] = { .type = NETLINK_TYPE_U32 },
/*
[IFLA_QDISC],
[IFLA_STATS],
*/
[IFLA_STATS] = { .size = sizeof(struct rtnl_link_stats) },
/*
[IFLA_COST],
[IFLA_PRIORITY],
*/
@@ -541,7 +543,9 @@ static const NLType rtnl_link_types[] = {
/*
[IFLA_NUM_VF],
[IFLA_VFINFO_LIST] = {. type = NETLINK_TYPE_NESTED, },
[IFLA_STATS64],
*/
[IFLA_STATS64] = { .size = sizeof(struct rtnl_link_stats64) },
/*
[IFLA_VF_PORTS] = { .type = NETLINK_TYPE_NESTED },
[IFLA_PORT_SELF] = { .type = NETLINK_TYPE_NESTED },
*/