sock_diag: align nlattr properly when needed

I also fix the value of INET_DIAG_MAX. It's wrong since commit 8f840e47f1
which is only in net-next right now, thus I didn't make a separate patch.

Fixes: 8f840e47f1 ("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>
This commit is contained in:
Nicolas Dichtel
2016-04-26 10:06:14 +02:00
committed by David S. Miller
parent 3c6f3714d6
commit 6ed46d1247
4 changed files with 13 additions and 7 deletions

View File

@@ -115,9 +115,11 @@ enum {
INET_DIAG_SKV6ONLY,
INET_DIAG_LOCALS,
INET_DIAG_PEERS,
INET_DIAG_PAD,
__INET_DIAG_MAX,
};
#define INET_DIAG_MAX INET_DIAG_SKV6ONLY
#define INET_DIAG_MAX (__INET_DIAG_MAX - 1)
/* INET_DIAG_MEM */