lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1534760761-30206-1-git-send-email-Haiqing.Bai@windriver.com>
Date:   Mon, 20 Aug 2018 18:26:01 +0800
From:   Haiqing Bai <Haiqing.Bai@...driver.com>
To:     <jon.maloy@...csson.com>, <ying.xue@...driver.com>,
        <davem@...emloft.net>, <zhenbo.gao@...driver.com>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian

The tipc multicast demo in tipcutils fails to work on big-endian hardware.
The tipc multicast server can not receive the packets sent by the multicast
client for that the dest port is always zero after tipc_dest_pop, then it
is found that the struct tipc_dest fails to take big/little endian into
account.

Signed-off-by: Haiqing Bai <Haiqing.Bai@...driver.com>
Signed-off-by: Zhenbo Gao <zhenbo.gao@...driver.com>
---
 net/tipc/name_table.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h
index 0febba4..6e1e0ab 100644
--- a/net/tipc/name_table.h
+++ b/net/tipc/name_table.h
@@ -135,8 +135,13 @@ struct tipc_dest {
 	struct list_head list;
 	union {
 		struct {
+#ifdef __LITTLE_ENDIAN_BITFIELD
 			u32 port;
 			u32 node;
+#else /* __BIG_ENDIAN_BITFIELD */
+			u32 node;
+			u32 port;
+#endif
 		};
 		u64 value;
 	};
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ