diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-03-27 20:15:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-27 20:15:29 -0400 |
commit | adcfe1964e627b62fbc6e45609b1f0db2c64dd14 (patch) | |
tree | 70b38565b7778c2e4c5d66731b29212e4f8665d8 /net | |
parent | 14a4b42bd6082b4ce3b94bad00cd367707cc1e97 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/rtnetlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index ed0766f0181a..bf919b6acea2 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -653,6 +653,7 @@ static inline size_t if_nlmsg_size(const struct net_device *dev) | |||
653 | + nla_total_size(IFNAMSIZ) /* IFLA_QDISC */ | 653 | + nla_total_size(IFNAMSIZ) /* IFLA_QDISC */ |
654 | + nla_total_size(sizeof(struct rtnl_link_ifmap)) | 654 | + nla_total_size(sizeof(struct rtnl_link_ifmap)) |
655 | + nla_total_size(sizeof(struct rtnl_link_stats)) | 655 | + nla_total_size(sizeof(struct rtnl_link_stats)) |
656 | + nla_total_size(sizeof(struct rtnl_link_stats64)) | ||
656 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */ | 657 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */ |
657 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */ | 658 | + nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */ |
658 | + nla_total_size(4) /* IFLA_TXQLEN */ | 659 | + nla_total_size(4) /* IFLA_TXQLEN */ |