Messages in this thread Patch in this message |  | | From | Haiqing Bai <> | Subject | [PATCH] tipc: fix issue that tipc_dest neglects of big-endian | Date | Mon, 20 Aug 2018 18:26:01 +0800 |
| |
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@windriver.com> Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.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
|  |