* [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()
@ 2016-11-22 6:14 Zhang Shengju
2016-11-23 15:38 ` Roopa Prabhu
2016-11-24 1:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Zhang Shengju @ 2016-11-22 6:14 UTC (permalink / raw)
To: netdev, davem; +Cc: roopa
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 <zhangshengju@cmss.chinamobile.com>
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f4b9350..09e115b 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2734,7 +2734,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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()
2016-11-22 6:14 [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() Zhang Shengju
@ 2016-11-23 15:38 ` Roopa Prabhu
2016-11-24 1:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Roopa Prabhu @ 2016-11-23 15:38 UTC (permalink / raw)
To: Zhang Shengju; +Cc: netdev, davem
On 11/21/16, 10:14 PM, Zhang Shengju wrote:
> 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 <zhangshengju@cmss.chinamobile.com>
> ---
> net/core/rtnetlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index f4b9350..09e115b 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -2734,7 +2734,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)
This looks fine to me. However, looking at the git log, since this code has been
around for so long, it seems like it can go into net-next. But, that's just my 2c.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()
2016-11-22 6:14 [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() Zhang Shengju
2016-11-23 15:38 ` Roopa Prabhu
@ 2016-11-24 1:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-11-24 1:27 UTC (permalink / raw)
To: zhangshengju; +Cc: netdev, roopa
From: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Date: Tue, 22 Nov 2016 14:14:28 +0800
> 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 <zhangshengju@cmss.chinamobile.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-24 1:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 6:14 [net] rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit() Zhang Shengju
2016-11-23 15:38 ` Roopa Prabhu
2016-11-24 1:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).