mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-01-22 22:52:20 +08:00
ID:409 - Fix IPv6 socket creation on Windows/Cygwin.
IPv6-based LAN interface connection using global IPv6 address fails under Windows/Cygwin. This patch fixes the problem.
This commit is contained in:
parent
ac1b3e1d46
commit
f67a7a3b2f
@ -451,7 +451,7 @@ ipmi_intf_socket_connect(struct ipmi_intf * intf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* OK, now try to connect with the scope id from this interface address */
|
/* OK, now try to connect with the scope id from this interface address */
|
||||||
if (addr6->sin6_scope_id != 0) {
|
if (addr6->sin6_scope_id != 0 || !IN6_IS_ADDR_LINKLOCAL(&tmp6->sin6_addr)) {
|
||||||
if (connect(intf->fd, rp->ai_addr, rp->ai_addrlen) != -1) {
|
if (connect(intf->fd, rp->ai_addr, rp->ai_addrlen) != -1) {
|
||||||
hints.ai_family = rp->ai_family;
|
hints.ai_family = rp->ai_family;
|
||||||
lprintf(LOG_DEBUG, "Successful connected on %s interface with scope id %d", ifa->ifa_name, tmp6->sin6_scope_id);
|
lprintf(LOG_DEBUG, "Successful connected on %s interface with scope id %d", ifa->ifa_name, tmp6->sin6_scope_id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user