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 committed Aug 27, 2024
1 parent 408f168 commit 15243a4
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 @@ -2185,7 +2185,7 @@ int ldms_xprt_names(ldms_t x, char *lcl_name, size_t lcl_name_sz,
}

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

0 comments on commit 15243a4

Please sign in to comment.