Skip to content

Commit 9391f26

Browse files
kcp-gitjfvogel
authored andcommitted
rds: Incorrect rds-info send and retransmission message output
Function rds_conn_message_info_cmn() does not skip IPv6 connections if the request is for IPv4 connections only. This causes an IPv6 address to be printed out as an IPv4 address (using only the last 32 bits). Orabug: 28898827 Signed-off-by: Ka-Cheong Poon <[email protected]> Reviewed-by: Håkon Bugge <[email protected]> Orabug: 33590097 UEK6 => UEK7 (cherry picked from commit 8b6537b) cherry-pick-repo=UEK/production/linux-uek.git Signed-off-by: Gerd Rausch <[email protected]> Reviewed-by: William Kucharski <[email protected]>
1 parent 033dc60 commit 9391f26

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

net/rds/connection.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,15 +576,16 @@ EXPORT_SYMBOL_GPL(rds_conn_destroy);
576576

577577
static void __rds_inc_msg_cp(struct rds_incoming *inc,
578578
struct rds_info_iterator *iter,
579-
void *saddr, void *daddr, int flip, bool isv6)
579+
struct in6_addr *saddr, struct in6_addr *daddr,
580+
int flip, bool isv6)
580581
{
581582
#if IS_ENABLED(CONFIG_IPV6)
582583
if (isv6)
583584
rds6_inc_info_copy(inc, iter, saddr, daddr, flip);
584585
else
585586
#endif
586-
rds_inc_info_copy(inc, iter, *(__be32 *)saddr,
587-
*(__be32 *)daddr, flip);
587+
rds_inc_info_copy(inc, iter, saddr->s6_addr32[3],
588+
daddr->s6_addr32[3], flip);
588589
}
589590

590591
static void rds_conn_message_info_cmn(struct socket *sock, unsigned int len,
@@ -614,6 +615,9 @@ static void rds_conn_message_info_cmn(struct socket *sock, unsigned int len,
614615
struct rds_conn_path *cp;
615616
int npaths;
616617

618+
if (!isv6 && conn->c_isv6)
619+
continue;
620+
617621
npaths = (conn->c_trans->t_mp_capable ?
618622
RDS_MPATH_WORKERS : 1);
619623

0 commit comments

Comments
 (0)