summaryrefslogtreecommitdiff
path: root/src/monitor
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-01-17 09:12:45 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-01-17 14:50:23 -0500
commit5352c9b3609bca63814f9f6f03dbbbadf6c6333a (patch)
treeb066ac5fbd429af1966451bb6e9ec077bca63fc5 /src/monitor
parent50b2904bc09dee04fbc5b13246a33f5d3b257d2e (diff)
downloadsssd-5352c9b3609bca63814f9f6f03dbbbadf6c6333a.tar.gz
sssd-5352c9b3609bca63814f9f6f03dbbbadf6c6333a.tar.bz2
sssd-5352c9b3609bca63814f9f6f03dbbbadf6c6333a.zip
Remove support for pre-1.1 netlink
Netlink 1.0 and older is buggy and unreliable, occasionally causing tight-loops. We're no longer going to try to support it. https://fedorahosted.org/sssd/ticket/755
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor_netlink.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/monitor/monitor_netlink.c b/src/monitor/monitor_netlink.c
index 29a182b9..33be7c85 100644
--- a/src/monitor/monitor_netlink.c
+++ b/src/monitor/monitor_netlink.c
@@ -49,20 +49,11 @@
#define SOL_NETLINK 270
#endif
-#ifdef HAVE_LIBNL_OLDER_THAN_1_1
-#define nlw_get_fd nl_handle_get_fd
-#define nlw_recvmsgs_default nl_recvmsgs_def
-#define nlw_get_pid nl_handle_get_pid
-#define nlw_object_match nl_object_match
-#define NLW_OK NL_PROCEED
-#define OBJ_CAST(ptr) ((struct nl_object *) (ptr))
-#else
#define nlw_get_fd nl_socket_get_fd
#define nlw_recvmsgs_default nl_recvmsgs_default
#define nlw_get_pid nl_socket_get_local_port
#define nlw_object_match nl_object_match_filter
#define NLW_OK NL_OK
-#endif
struct netlink_ctx {
#ifdef HAVE_LIBNL
@@ -182,19 +173,6 @@ static int nlw_group_subscribe(struct nl_handle *nlh)
* Callbacks for validating and receiving messages
*******************************************************************/
-#ifdef HAVE_LIBNL_OLDER_THAN_1_1
-static int event_msg_recv(struct sockaddr_nl *nla, struct nlmsghdr *hdr,
- void *arg)
-{
- struct netlink_ctx *ctx = (struct netlink_ctx *) arg;
-
- if (!nlw_accept_message(ctx->nlh, nla, hdr)) {
- return NL_SKIP;
- }
-
- return NLW_OK;
-}
-#else
static int event_msg_recv(struct nl_msg *msg, void *arg)
{
struct netlink_ctx *ctx = (struct netlink_ctx *) arg;
@@ -218,24 +196,14 @@ static int event_msg_recv(struct nl_msg *msg, void *arg)
return NLW_OK;
}
-#endif
static void link_msg_handler(struct nl_object *obj, void *arg);
-#ifdef HAVE_LIBNL_OLDER_THAN_1_1
-static int event_msg_ready(struct sockaddr_nl *nla, struct nlmsghdr *hdr,
- void *arg)
-{
- nl_msg_parse(hdr, &link_msg_handler, arg);
- return NLW_OK;
-}
-#else
static int event_msg_ready(struct nl_msg *msg, void *arg)
{
nl_msg_parse(msg, &link_msg_handler, arg);
return NLW_OK;
}
-#endif
static int nlw_set_callbacks(struct nl_handle *nlh, void *data)
{