summaryrefslogtreecommitdiffstats
path: root/net/rds/tcp_listen.c
diff options
context:
space:
mode:
authorSowmini Varadhan2017-06-15 20:28:54 +0200
committerDavid S. Miller2017-06-16 18:45:15 +0200
commit00354de5779db4aa9c019db787ef89bd1a6b149b (patch)
tree94bdcc84fb39332c5fb175cbe50c4cfb32acadc4 /net/rds/tcp_listen.c
parentrds: tcp: remove cp_outgoing (diff)
downloadkernel-qcow2-linux-00354de5779db4aa9c019db787ef89bd1a6b149b.tar.gz
kernel-qcow2-linux-00354de5779db4aa9c019db787ef89bd1a6b149b.tar.xz
kernel-qcow2-linux-00354de5779db4aa9c019db787ef89bd1a6b149b.zip
rds: tcp: various endian-ness fixes
Found when testing between sparc and x86 machines on different subnets, so the address comparison patterns hit the corner cases and brought out some bugs fixed by this patch. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Tested-by: Imanti Mendez <imanti.mendez@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/tcp_listen.c')
-rw-r--r--net/rds/tcp_listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
index 238ff5c9a75b..f9c6312be841 100644
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -83,7 +83,7 @@ static
struct rds_tcp_connection *rds_tcp_accept_one_path(struct rds_connection *conn)
{
int i;
- bool peer_is_smaller = (conn->c_faddr < conn->c_laddr);
+ bool peer_is_smaller = IS_CANONICAL(conn->c_faddr, conn->c_laddr);
int npaths = max_t(int, 1, conn->c_npaths);
/* for mprds, all paths MUST be initiated by the peer