summaryrefslogtreecommitdiffstats
path: root/src/external
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-06-27 21:22:11 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-07-09 11:44:07 -0400
commit90acbcf20b5f896ca8f631923afe946c90d90de7 (patch)
treea4942121f0c624d1ea6f16bf093924fade010b88 /src/external
parent801fcc63a9ec83d76d8d027758f9a0357b34890f (diff)
downloadsssd-90acbcf20b5f896ca8f631923afe946c90d90de7.tar.gz
sssd-90acbcf20b5f896ca8f631923afe946c90d90de7.tar.xz
sssd-90acbcf20b5f896ca8f631923afe946c90d90de7.zip
Use netlink to detect going online
Integrates libnl to detect adding routes. When a route is added, the offline status of all back ends is reset. This patch adds no heuristics to detect whether back end went offline. Fixes: #456
Diffstat (limited to 'src/external')
-rw-r--r--src/external/libnl.m436
1 files changed, 36 insertions, 0 deletions
diff --git a/src/external/libnl.m4 b/src/external/libnl.m4
new file mode 100644
index 000000000..ed8f95b63
--- /dev/null
+++ b/src/external/libnl.m4
@@ -0,0 +1,36 @@
+dnl A macro to check the availability and version of libnetlink
+AC_DEFUN([AM_CHECK_LIBNL],
+[
+ PKG_CHECK_MODULES(libnl, libnl-1)
+
+ AC_CHECK_HEADERS(netlink.h)
+ AC_CHECK_LIB(nl, nl_connect, [ LIBNL_LIBS="-lnl" ], [AC_MSG_ERROR([libnl is required])])
+
+ AC_CHECK_LIB([nl],
+ [nl_handle_get_fd],
+ [AC_DEFINE([HAVE_LIBNL_OLDER_THAN_1_1], 1, [Does libnl have pre-1.1 API?])
+ ],
+ )
+
+ dnl Check if this particular version of libnl supports particular functions
+ AC_CHECK_LIB([nl],
+ [nl_socket_add_membership],
+ [AC_DEFINE([HAVE_NL_SOCKET_ADD_MEMBERSHIP], 1, [Does libnl have nl_socket_add_membership?])
+ ],
+ )
+
+ AC_CHECK_LIB([nl],
+ [nl_socket_modify_cb],
+ [AC_DEFINE([HAVE_NL_SOCKET_MODIFY_CB], 1, [Does libnl have nl_socket_modify_cb?])
+ ],
+ )
+
+ AC_CHECK_LIB([nl],
+ [nl_set_passcred],
+ [AC_DEFINE([HAVE_NL_SET_PASSCRED], 1, [Does libnl have nl_set_passcred?])
+ ],
+ )
+
+ AC_SUBST(LIBNL_CFLAGS)
+ AC_SUBST(LIBNL_LIBS)
+])