summaryrefslogtreecommitdiff
path: root/src/plugins/ipmi_intf.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-08 22:59:06 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-08 22:59:06 +0200
commita7c8ed90be739a49937a229828c470f1ad01396e (patch)
tree4cd43ff357d98a1ce5afb3bb9449afcce5a299d1 /src/plugins/ipmi_intf.c
parentfa5ac2da06fae952fe1295a1e955bdb35e6d86c4 (diff)
parent342ebce798fe98ede64939a49bbc3770d8214649 (diff)
Merge tag 'upstream/1.8.17'
Upstream version 1.8.17
Diffstat (limited to 'src/plugins/ipmi_intf.c')
-rw-r--r--src/plugins/ipmi_intf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/ipmi_intf.c b/src/plugins/ipmi_intf.c
index 19ba5e3..6cf0553 100644
--- a/src/plugins/ipmi_intf.c
+++ b/src/plugins/ipmi_intf.c
@@ -31,6 +31,7 @@
*/
#define _XOPEN_SOURCE 700
#define _GNU_SOURCE 1
+#define _DARWIN_C_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
@@ -451,7 +452,7 @@ ipmi_intf_socket_connect(struct ipmi_intf * intf)
}
/* 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) {
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);