From: Zhang Shengju Date: Tue, 22 Nov 2016 06:14:28 +0000 (+0800) Subject: rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93af205656bed3d8d3f4b85b2a3749c7ed7d996a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() For RT netlink, calcit() function should return the minimal size for netlink dump message. This will make sure that dump message for every network device can be stored. Currently, rtnl_calcit() function doesn't account the size of header of netlink message, this patch will fix it. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a99917b5de33..deb35acbefd0 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2737,7 +2737,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh) ext_filter_mask)); } - return min_ifinfo_dump_size; + return nlmsg_total_size(min_ifinfo_dump_size); } static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)