Skip to content

Commit

Permalink
Fix incorrect remote hostname and port produced by ldms_xprt_names()
Browse files Browse the repository at this point in the history
Previosly, ldms_xprt_names() incorrectly passed the local address to
getnameinfo() to obtain the remote hostname and port. This resulted in
incorrect output.
  • Loading branch information
nichamon authored and tom95858 committed Aug 30, 2024
1 parent 26a75ad commit afa2b74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldms/src/core/ldms_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ int ldms_xprt_names(ldms_t x, char *lcl_name, size_t lcl_name_sz,
}

if (rem_name || rem_port) {
(void)getnameinfo((void*)&lcl, xlen, rem_name, rem_name_sz,
(void) getnameinfo((void*)&rmt, xlen, rem_name, rem_name_sz,
rem_port, rem_port_sz, flags);
}
return 0;
Expand Down

0 comments on commit afa2b74

Please sign in to comment.