projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b6d95bf
)
network plugin: Print a warning when setting the interface on a unicast socket is...
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 5 Apr 2010 14:32:19 +0000
(16:32 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 5 Apr 2010 14:32:19 +0000
(16:32 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
9cb8c38
..
af4a117
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-1653,6
+1653,7
@@
static int network_set_interface (const sockent_t *se, const struct addrinfo *ai
}
}
}
}
+ /* else: Not a multicast interface. */
#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME && defined(SO_BINDTODEVICE)
if (se->interface != 0)
{
#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME && defined(SO_BINDTODEVICE)
if (se->interface != 0)
{
@@
-1673,7
+1674,18
@@
static int network_set_interface (const sockent_t *se, const struct addrinfo *ai
return (-1);
}
}
return (-1);
}
}
-#endif /* HAVE_IF_INDEXTONAME && SO_BINDTODEVICE */
+/* #endif HAVE_IF_INDEXTONAME && SO_BINDTODEVICE */
+
+#else
+ WARNING ("network plugin: Cannot set the interface on a unicast "
+ "socket because "
+# if !defined(SO_BINDTODEVICE)
+ "the the \"SO_BINDTODEVICE\" socket option "
+# else
+ "the \"if_indextoname\" function "
+# endif
+ "is not available on your system.");
+#endif
return (0);
} /* }}} network_set_interface */
return (0);
} /* }}} network_set_interface */