mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-6636 : Merged fixes for lp:1167368 and lp:1250805.
This commit is contained in:
@@ -373,11 +373,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
|
|||||||
unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str);
|
unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str);
|
||||||
|
|
||||||
if (INADDR_NONE == ip_type) {
|
if (INADDR_NONE == ip_type) {
|
||||||
WSREP_ERROR("Networking not configured, cannot receive state transfer.");
|
WSREP_ERROR("Node IP address not obtained from bind_address, trying alternate methods");
|
||||||
return 0;
|
} else if (INADDR_ANY != ip_type) {
|
||||||
}
|
|
||||||
|
|
||||||
if (INADDR_ANY != ip_type) {;
|
|
||||||
strncpy (buf, my_bind_addr_str, buf_len);
|
strncpy (buf, my_bind_addr_str, buf_len);
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
@@ -404,8 +401,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
|
|||||||
|
|
||||||
// try to find the address of the first one
|
// try to find the address of the first one
|
||||||
#if (TARGET_OS_LINUX == 1)
|
#if (TARGET_OS_LINUX == 1)
|
||||||
const char cmd[] = "ip addr show | grep -E '^\\s*inet' | grep -m1 global |"
|
const char cmd[] = "ip addr show | grep -E '^[[:space:]]*inet' | grep -m1 global |"
|
||||||
" awk '{ print $2 }' | sed 's/\\/.*//'";
|
" awk '{ print $2 }' | sed -e 's/\\/.*//'";
|
||||||
#elif defined(__sun__)
|
#elif defined(__sun__)
|
||||||
const char cmd[] = "/sbin/ifconfig -a | "
|
const char cmd[] = "/sbin/ifconfig -a | "
|
||||||
"/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'";
|
"/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'";
|
||||||
|
Reference in New Issue
Block a user