[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <7c4a72239f4795677484c99c105ef5f27c12d246.1363871797.git.tgraf@suug.ch>
Date: Thu, 21 Mar 2013 14:17:00 +0100
From: Thomas Graf <tgraf@...g.ch>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org
Subject: [PATCH] unix_diag: Fix definition of UNIX_DIAG_MAX
UNIX_DIAG_MAX should point to the maximum attribute type known
instead of + 1. User space applications compiled against the
old definition are currently passing through unknown attribute
types while parsing.
Signed-off-by: Thomas Graf <tgraf@...g.ch>
---
include/uapi/linux/unix_diag.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h
index b8a2494..387aab0 100644
--- a/include/uapi/linux/unix_diag.h
+++ b/include/uapi/linux/unix_diag.h
@@ -38,10 +38,11 @@ enum {
UNIX_DIAG_RQLEN,
UNIX_DIAG_MEMINFO,
UNIX_DIAG_SHUTDOWN,
-
- UNIX_DIAG_MAX,
+ __UNIX_DIAG_MAX,
};
+#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1)
+
struct unix_diag_vfs {
__u32 udiag_vfs_ino;
__u32 udiag_vfs_dev;
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists