]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sunrpc: increase UNX_MAXNODENAME from 32 to __NEW_UTS_LEN bytes
authorJeff Layton <jlayton@poochiereds.net>
Mon, 3 Aug 2015 11:44:53 +0000 (07:44 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Sun, 30 Sep 2018 00:01:21 +0000 (17:01 -0700)
commit37d418359f30de0141624cd911cae37e6221cbe8
treed4d4c14c8b0e372cfb317cd5174f72acd99d35af
parent60ca15120a6679e75f1b1ccc2e47cc3285c076f8
sunrpc: increase UNX_MAXNODENAME from 32 to __NEW_UTS_LEN bytes

The current limit of 32 bytes artificially limits the name string that
we end up stuffing into NFSv4.x client ID blobs. If you have multiple
hosts with long hostnames that only differ near the end, then this can
cause NFSv4 client ID collisions.

Linux nodenames are actually limited to __NEW_UTS_LEN bytes (64), so use
that as the limit instead. Also, use XDR_QUADLEN to specify the slack
length, just for clarity and in case someone in the future changes this
to something not evenly divisible by 4.

Reported-by: Michael Skralivetsky <michael.skralivetsky@primarydata.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Orabug: 28660177
(cherry picked from commit 24a9a9610ce3ba36fd87c1d2f2c9106de6b7e832)
Signed-off-by: Calum Mackay <calum.mackay@oracle.com>
Reviewed-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Reviewed-by: John Sobecki <john.sobecki@oracle.com>
Tested-by: Joe Jin <joe.jin@oracle.com>
include/linux/sunrpc/auth.h
net/sunrpc/auth_unix.c