]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
net: increase preallocated size of nlmsg to accomodate for IFLA_STATS64
authorJan Engelhardt <jengelh@medozas.de>
Sun, 28 Mar 2010 00:15:29 +0000 (17:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Mar 2010 00:15:29 +0000 (17:15 -0700)
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>
net/core/rtnetlink.c

index ed0766f0181ac1473c4c5e3845016a3496b92326..bf919b6acea20a9f33ef5ad3c747b43b70a9f79a 100644 (file)
@@ -653,6 +653,7 @@ static inline size_t if_nlmsg_size(const struct net_device *dev)
               + nla_total_size(IFNAMSIZ) /* IFLA_QDISC */
               + nla_total_size(sizeof(struct rtnl_link_ifmap))
               + nla_total_size(sizeof(struct rtnl_link_stats))
+              + nla_total_size(sizeof(struct rtnl_link_stats64))
               + nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */
               + nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */
               + nla_total_size(4) /* IFLA_TXQLEN */