提交 1a26bfaf 编写于 作者: A Alexander Aring 提交者: David Teigland

fs: dlm: fix check for multi-homed hosts

This patch will use the runtime array size dlm_local_count variable
to check the actual size of the dlm_local_addr array. There exists
currently a cleanup bug, because the tcp_listen_for_all() functionality
might check on a dangled pointer.
Signed-off-by: NAlexander Aring <aahringo@redhat.com>
Signed-off-by: NDavid Teigland <teigland@redhat.com>
上级 d11ccd45
......@@ -1288,7 +1288,7 @@ static int sctp_listen_for_all(struct listen_connection *con)
static int tcp_listen_for_all(void)
{
/* We don't support multi-homed hosts */
if (dlm_local_addr[1] != NULL) {
if (dlm_local_count > 1) {
log_print("TCP protocol can't handle multi-homed hosts, "
"try SCTP");
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册