Commit adcfe1964e627b62fbc6e45609b1f0db2c64dd14
Committed by
David S. Miller
1 parent
14a4b42bd6
Exists in
master
and in
7 other branches
net: increase preallocated size of nlmsg to accomodate for IFLA_STATS64
When more data is stuffed into an nlmsg than initially projected, an extra allocation needs to be done. Reserve enough for IFLA_STATS64 so that this does not to needlessy happen. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff
net/core/rtnetlink.c
... | ... | @@ -653,6 +653,7 @@ |
653 | 653 | + nla_total_size(IFNAMSIZ) /* IFLA_QDISC */ |
654 | 654 | + nla_total_size(sizeof(struct rtnl_link_ifmap)) |
655 | 655 | + nla_total_size(sizeof(struct rtnl_link_stats)) |
656 | + + nla_total_size(sizeof(struct rtnl_link_stats64)) | |
656 | 657 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */ |
657 | 658 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */ |
658 | 659 | + nla_total_size(4) /* IFLA_TXQLEN */ |