From ec593fb0f444a948bd51637fa2470c28a541fb85 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Wed, 6 Nov 2019 16:59:45 +1100 Subject: [PATCH] LU-12678 lnet: use lnet_accept_magic, not le32_to_cpu. This le32_to_cpu() looks wrong, as the argument is a CPU value, not le32, and the value is being compared to something that might be le32. Previous code used lnet_accept_magic() for tests on 'magic', so it seems to make sense to use lnet_accept_magic() here too. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I3f04bb087d4ae3d6785e77072b51132f9440bd32 Reviewed-on: https://review.whamcloud.com/36857 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Serguei Smirnov Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lnet/lnet/acceptor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/lnet/acceptor.c b/lnet/lnet/acceptor.c index 232018b..9f1fc51 100644 --- a/lnet/lnet/acceptor.c +++ b/lnet/lnet/acceptor.c @@ -252,7 +252,7 @@ lnet_accept(struct socket *sock, __u32 magic) return -EPROTO; } - if (magic == le32_to_cpu(LNET_PROTO_TCP_MAGIC)) + if (lnet_accept_magic(magic, LNET_PROTO_TCP_MAGIC)) str = "'old' socknal/tcpnal"; else str = "unrecognised"; -- 1.8.3.1