aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2016-04-26 10:06:14 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-26 12:00:48 -0400
commit6ed46d1247a595c58b6c04481fa77cf532f45de0 (patch)
tree16ff8cec378c83d80cb395c152af472fa9fdb3de /net/core
parentfs/quota: use nla_put_u64_64bit() (diff)
downloadlinux-dev-6ed46d1247a595c58b6c04481fa77cf532f45de0.tar.xz
linux-dev-6ed46d1247a595c58b6c04481fa77cf532f45de0.zip
sock_diag: align nlattr properly when needed
I also fix the value of INET_DIAG_MAX. It's wrong since commit 8f840e47f190 which is only in net-next right now, thus I didn't make a separate patch. Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock_diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
index ca9e35bbe13c..6b10573cc9fa 100644
--- a/net/core/sock_diag.c
+++ b/net/core/sock_diag.c
@@ -120,7 +120,7 @@ static size_t sock_diag_nlmsg_size(void)
{
return NLMSG_ALIGN(sizeof(struct inet_diag_msg)
+ nla_total_size(sizeof(u8)) /* INET_DIAG_PROTOCOL */
- + nla_total_size(sizeof(struct tcp_info))); /* INET_DIAG_INFO */
+ + nla_total_size_64bit(sizeof(struct tcp_info))); /* INET_DIAG_INFO */
}
static void sock_diag_broadcast_destroy_work(struct work_struct *work)