* [PATCH] unix_diag: Fix definition of UNIX_DIAG_MAX
@ 2013-03-21 13:17 Thomas Graf
2013-03-21 14:40 ` Thomas Graf
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Graf @ 2013-03-21 13:17 UTC (permalink / raw)
To: davem; +Cc: netdev
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@suug.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-21 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21 13:17 [PATCH] unix_diag: Fix definition of UNIX_DIAG_MAX Thomas Graf
2013-03-21 14:40 ` Thomas Graf
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).