Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222032
b: refs/heads/master
c: 369cf77
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Nov 12, 2010
1 parent dfe17d6 commit 6c8ae18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8877870f8a8127b653f8c9a55c6b4de9f96f639b
refs/heads/master: 369cf77a6a3e41b1110506ddf43d45804103bfde
9 changes: 5 additions & 4 deletions trunk/net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,17 @@ static size_t rtnl_link_get_size(const struct net_device *dev)
if (!ops)
return 0;

size = nlmsg_total_size(sizeof(struct nlattr)) + /* IFLA_LINKINFO */
nlmsg_total_size(strlen(ops->kind) + 1); /* IFLA_INFO_KIND */
size = nla_total_size(sizeof(struct nlattr)) + /* IFLA_LINKINFO */
nla_total_size(strlen(ops->kind) + 1); /* IFLA_INFO_KIND */

if (ops->get_size)
/* IFLA_INFO_DATA + nested data */
size += nlmsg_total_size(sizeof(struct nlattr)) +
size += nla_total_size(sizeof(struct nlattr)) +
ops->get_size(dev);

if (ops->get_xstats_size)
size += ops->get_xstats_size(dev); /* IFLA_INFO_XSTATS */
/* IFLA_INFO_XSTATS */
size += nla_total_size(ops->get_xstats_size(dev));

return size;
}
Expand Down

0 comments on commit 6c8ae18

Please sign in to comment.