diff --git a/.dlm.metadata b/.dlm.metadata
index df92db0..4b93444 100644
--- a/.dlm.metadata
+++ b/.dlm.metadata
@@ -1 +1 @@
-84b761550b04752330f23952b0ddde7138f51520 SOURCES/dlm-4.0.2.tar.gz
+ceaf73af4f369af3f951ac0a6bdec18444c2d820 SOURCES/dlm-4.0.6.tar.gz
diff --git a/.gitignore b/.gitignore
index 78d6f27..cec0dbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/dlm-4.0.2.tar.gz
+SOURCES/dlm-4.0.6.tar.gz
diff --git a/SOURCES/0001-dlm_stonith-add-man-page.patch b/SOURCES/0001-dlm_stonith-add-man-page.patch
deleted file mode 100644
index 4bc796e..0000000
--- a/SOURCES/0001-dlm_stonith-add-man-page.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 01b5a1828fa3817ff1c6b8dd9bb024750eea830f Mon Sep 17 00:00:00 2001
-From: David Teigland <teigland@redhat.com>
-Date: Thu, 1 Aug 2013 11:37:06 -0500
-Subject: [PATCH] dlm_stonith: add man page
-
-Signed-off-by: David Teigland <teigland@redhat.com>
----
- fence/dlm_stonith.8 | 37 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 37 insertions(+)
- create mode 100644 fence/dlm_stonith.8
-
-diff --git a/fence/dlm_stonith.8 b/fence/dlm_stonith.8
-new file mode 100644
-index 0000000..14993d9
---- /dev/null
-+++ b/fence/dlm_stonith.8
-@@ -0,0 +1,37 @@
-+.TH DLM_STONITH 8 2013-08-01 dlm dlm
-+
-+.SH NAME
-+dlm_stonith \- a proxy for fencing via stonith/pacemaker
-+
-+.SH SYNOPSIS
-+.B dlm_stonith
-+
-+.SH DESCRIPTION 
-+
-+dlm_controld can use dlm_stonith as a proxy fence agent when
-+the stonith/pacemaker system performs actual fencing.
-+
-+dlm_stonith is run by dlm_controld, and is not meant to be
-+run manually.  dlm_controld provides the options on stdin
-+as key=val; command line options are for testing.
-+
-+If fencing was successful, this program has a zero exit code.
-+If fencing failed, this program has a non-zero exit code.
-+
-+.SH OPTIONS
-+
-+.BI \-n " nodeid"
-+
-+The nodeid of the target node.  (stdin key is "node")
-+
-+.BI \-t " fail_time"
-+
-+The wall time at which the target node failed.  The wall time at which the
-+node is fenced must be later than this for fencing to succeed.  (stdin key
-+is "fail_time")  For "wall time" see
-+.BR time (2).
-+
-+.SH SEE ALSO
-+.BR dlm_controld (8),
-+.BR dlm.conf (5)
-+
--- 
-1.8.3.1
-
diff --git a/SOURCES/0002-dlm_stonith-install-man-page.patch b/SOURCES/0002-dlm_stonith-install-man-page.patch
deleted file mode 100644
index 430c788..0000000
--- a/SOURCES/0002-dlm_stonith-install-man-page.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f8a4ed037cc32ef77ecce635a072859356c9e300 Mon Sep 17 00:00:00 2001
-From: David Teigland <teigland@redhat.com>
-Date: Thu, 1 Aug 2013 12:03:44 -0500
-Subject: [PATCH] dlm_stonith: install man page
-
-Signed-off-by: David Teigland <teigland@redhat.com>
----
- fence/Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/fence/Makefile b/fence/Makefile
-index b4c59dd..77bf0fd 100644
---- a/fence/Makefile
-+++ b/fence/Makefile
-@@ -1,10 +1,10 @@
- DESTDIR=
- PREFIX=/usr
- BINDIR=$(PREFIX)/sbin
--#MANDIR=$(PREFIX)/share/man
-+MANDIR=$(PREFIX)/share/man
- 
- BIN_TARGET = dlm_stonith
--#MAN_TARGET = dlm_stonith.8
-+MAN_TARGET = dlm_stonith.8
- 
- BIN_SOURCE = stonith_helper.c
- 
-@@ -53,5 +53,5 @@ install: all
- 	$(INSTALL) -d $(DESTDIR)/$(BINDIR)
- 	$(INSTALL) -d $(DESTDIR)/$(MANDIR)/man8
- 	$(INSTALL) -c -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR)
--#	$(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/
-+	$(INSTALL) -m 644 $(MAN_TARGET) $(DESTDIR)/$(MANDIR)/man8/
- 
--- 
-1.8.3.1
-
diff --git a/SOURCES/0003-libdlm-udev-dir-now-under-usr-lib.patch b/SOURCES/0003-libdlm-udev-dir-now-under-usr-lib.patch
deleted file mode 100644
index 9134c77..0000000
--- a/SOURCES/0003-libdlm-udev-dir-now-under-usr-lib.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 102d3c248c59f8f36a9d5088afd4eed787583e04 Mon Sep 17 00:00:00 2001
-From: David Teigland <teigland@redhat.com>
-Date: Thu, 1 Aug 2013 12:11:00 -0500
-Subject: [PATCH 3/3] libdlm: udev dir now under /usr/lib
-
-Signed-off-by: David Teigland <teigland@redhat.com>
----
- libdlm/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libdlm/Makefile b/libdlm/Makefile
-index 76d3504..e7cdb17 100644
---- a/libdlm/Makefile
-+++ b/libdlm/Makefile
-@@ -5,7 +5,7 @@ LIBDIR=$(PREFIX)/$(LIBNUM)
- HDRDIR=$(PREFIX)/include 
- MANDIR=$(PREFIX)/share/man
- PKGDIR=$(LIBDIR)/pkgconfig
--UDEVDIR=/lib/udev/rules.d
-+UDEVDIR=/usr/lib/udev/rules.d
- 
- LIB_NAME = libdlm
- LIB_MAJOR = 3
--- 
-1.8.3.1
-
diff --git a/SOURCES/0005-dlm_tool-fix-status-printing-in-libdlmcontrol.patch b/SOURCES/0005-dlm_tool-fix-status-printing-in-libdlmcontrol.patch
deleted file mode 100644
index 7af9ce1..0000000
--- a/SOURCES/0005-dlm_tool-fix-status-printing-in-libdlmcontrol.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 090026f33031c1b46dfe3e2e077c6cb0aa149378 Mon Sep 17 00:00:00 2001
-From: David Teigland <teigland@redhat.com>
-Date: Wed, 12 Feb 2014 12:09:10 -0600
-Subject: [PATCH 5/9] dlm_tool: fix status printing in libdlmcontrol
-
-When a node was both a startup node and a normal node,
-then status would segfault.
-
-Signed-off-by: David Teigland <teigland@redhat.com>
----
- dlm_controld/lib.c | 67 +++++++++++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 54 insertions(+), 13 deletions(-)
-
-diff --git a/dlm_controld/lib.c b/dlm_controld/lib.c
-index 961626f090ca..efb74e00638f 100644
---- a/dlm_controld/lib.c
-+++ b/dlm_controld/lib.c
-@@ -337,12 +337,19 @@ int dlmc_print_status(uint32_t flags)
- 	struct dlmc_state *st;
- 	char maxstr[DLMC_STATE_MAXSTR];
- 	char maxbin[DLMC_STATE_MAXBIN];
--	char *str, *bin;
--	int all_count, node_count, fence_count;
--	int all_ids[MAX_SORT], node_ids[MAX_SORT], fence_ids[MAX_SORT];
--	char *node_lines[MAX_SORT], *fence_lines[MAX_SORT];
--	char *node_line, *fence_line;
--	int fd, rv, off;
-+	char *str;
-+	char *bin;
-+	int all_count, node_count, fence_count, startup_count;
-+	int all_ids[MAX_SORT];
-+	int node_ids[MAX_SORT];
-+	int fence_ids[MAX_SORT];
-+	int startup_ids[MAX_SORT];
-+	char *node_lines[MAX_SORT];
-+	char *fence_lines[MAX_SORT];
-+	char *node_line;
-+	char *fence_line;
-+	int found_node;
-+	int fd, rv;
- 	int i, j;
- 
- 	init_header(&h, DLMC_CMD_DUMP_STATUS, NULL, 0);
-@@ -363,14 +370,15 @@ int dlmc_print_status(uint32_t flags)
- 	st = &state;
- 	str = maxstr;
- 	bin = maxbin;
--	off = 0;
- 
- 	all_count = 0;
- 	node_count = 0;
- 	fence_count = 0;
-+	startup_count = 0;
- 	memset(&all_ids, 0, sizeof(all_ids));
- 	memset(&node_ids, 0, sizeof(node_ids));
- 	memset(&fence_ids, 0, sizeof(fence_ids));
-+	memset(&startup_ids, 0, sizeof(startup_ids));
- 	memset(node_lines, 0, sizeof(node_lines));
- 	memset(fence_lines, 0, sizeof(fence_lines));
- 
-@@ -402,9 +410,11 @@ int dlmc_print_status(uint32_t flags)
- 			print_daemon(st, str, bin, flags);
- 			break;
- 
--		case DLMC_STATE_DAEMON_NODE:
- 		case DLMC_STATE_STARTUP_NODE:
-+			startup_ids[startup_count++] = st->nodeid;
-+			break;
- 
-+		case DLMC_STATE_DAEMON_NODE:
- 			if (flags & DLMC_STATUS_VERBOSE) {
- 				printf("nodeid %d\n", st->nodeid);
- 				print_str(str, st->str_len);
-@@ -426,7 +436,7 @@ int dlmc_print_status(uint32_t flags)
- 				all_ids[all_count++] = st->nodeid;
- 
- 				node_ids[node_count] = st->nodeid;
--				node_lines[node_count++] = node_line;
-+				node_lines[node_count] = node_line;
- 				node_count++;
- 
- 				if (!fence_line[0]) {
-@@ -450,13 +460,39 @@ int dlmc_print_status(uint32_t flags)
- 	if (all_count)
- 		qsort(all_ids, all_count, sizeof(int), nodeid_compare);
- 
-+	/* don't free any node_lines in this startup loop because we are just
-+	   borrowing them; they are needed in the real node loop below. */
-+
-+	if (startup_count) {
-+		for (i = 0; i < startup_count; i++) {
-+			found_node = 0;
-+			for (j = 0; j < node_count; j++) {
-+				if (startup_ids[i] != node_ids[j])
-+					continue;
-+				found_node = 1;
-+				if (!node_lines[j])
-+					printf("startup node %d\n", st->nodeid);
-+				else
-+					printf("startup %s", node_lines[j]);
-+				break;
-+			}
-+			if (!found_node)
-+				printf("startup node %d\n", st->nodeid);
-+		}
-+	}
-+
- 	if (all_count && fence_count) {
- 		for (i = 0; i < all_count; i++) {
- 			for (j = 0; j < fence_count; j++) {
- 				if (all_ids[i] != fence_ids[j])
- 					continue;
--				printf("%s", fence_lines[j]);
--				free(fence_lines[j]);
-+				if (!fence_lines[j]) {
-+					printf("fence %d no data\n", fence_ids[j]);
-+				} else {
-+					printf("%s", fence_lines[j]);
-+					free(fence_lines[j]);
-+					fence_lines[j] = NULL;
-+				}
- 				break;
- 			}
- 		}
-@@ -467,8 +503,13 @@ int dlmc_print_status(uint32_t flags)
- 			for (j = 0; j < node_count; j++) {
- 				if (all_ids[i] != node_ids[j])
- 					continue;
--				printf("%s", node_lines[j]);
--				free(node_lines[j]);
-+				if (!node_lines[j]) {
-+					printf("node %d no data\n", node_ids[j]);
-+				} else {
-+					printf("%s", node_lines[j]);
-+					free(node_lines[j]);
-+					node_lines[j] = NULL;
-+				}
- 				break;
- 			}
- 		}
--- 
-1.8.3.1
-
diff --git a/SOURCES/0008-dlm-clear-out-addrs-before-calling-into-corosync_cft.patch b/SOURCES/0008-dlm-clear-out-addrs-before-calling-into-corosync_cft.patch
deleted file mode 100644
index 7b0b977..0000000
--- a/SOURCES/0008-dlm-clear-out-addrs-before-calling-into-corosync_cft.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 54a5a6b7137c9f6e969bde8f0245a5bc3465536c Mon Sep 17 00:00:00 2001
-From: Christine Caulfield <ccaulfie@redhat.com>
-Date: Tue, 9 Sep 2014 09:29:01 +0100
-Subject: [PATCH 8/8] dlm: clear out addrs before calling into
- corosync_cft_get_node_addrs()
-
-The corosync_cfg_get_node_addrs() call does not fill the whole of the
-addrs field passed in, specifically it only writes the the address
-family and IP address, leaving the port number untouched.
-
-If the port number contains junk, then that can get passed into the
-kernel by dlm_controld where it is subsequently used in the comparison
-that checks for valid cluster nodes in a connection. If this happens
-then an otherwise valid connection can be rejected and the dlm will
-hang.
-
-I've seen this quite often on s390 but I don't see any reason why it
-might not also be causing intermittent connection problems on other
-archs.
-
-Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
----
- dlm_controld/member.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/dlm_controld/member.c b/dlm_controld/member.c
-index d4031ee7a948..10351ec41d6d 100644
---- a/dlm_controld/member.c
-+++ b/dlm_controld/member.c
-@@ -132,6 +132,7 @@ static void quorum_callback(quorum_handle_t h, uint32_t quorate,
- 
- 	quorum_node_count = 0;
- 	memset(&quorum_nodes, 0, sizeof(quorum_nodes));
-+	memset(&addrs, 0, sizeof(addrs));
- 
- 	for (i = 0; i < node_list_entries; i++)
- 		quorum_nodes[quorum_node_count++] = node_list[i];
--- 
-1.8.3.1
-
diff --git a/SOURCES/0010-dlm_controld-don-t-log-error-from-cpg_dispatch.patch b/SOURCES/0010-dlm_controld-don-t-log-error-from-cpg_dispatch.patch
deleted file mode 100644
index e0175fc..0000000
--- a/SOURCES/0010-dlm_controld-don-t-log-error-from-cpg_dispatch.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From b5b06ccf564cd339b91526c13be1dd86d06c1a93 Mon Sep 17 00:00:00 2001
-From: David Teigland <teigland@redhat.com>
-Date: Mon, 13 Apr 2015 11:00:40 -0500
-Subject: [PATCH 10/10] dlm_controld: don't log error from cpg_dispatch
-
-These errors from cpg_dispatch are expected.
-
-Signed-off-by: David Teigland <teigland@redhat.com>
----
- dlm_controld/cpg.c        | 2 +-
- dlm_controld/daemon_cpg.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/dlm_controld/cpg.c b/dlm_controld/cpg.c
-index f97115835987..b23a008e1996 100644
---- a/dlm_controld/cpg.c
-+++ b/dlm_controld/cpg.c
-@@ -1664,7 +1664,7 @@ static void process_cpg_lockspace(int ci)
- 	}
- 
- 	error = cpg_dispatch(ls->cpg_handle, CS_DISPATCH_ALL);
--	if (error != CS_OK) {
-+	if (error != CS_OK && error != CS_ERR_BAD_HANDLE) {
- 		log_error("cpg_dispatch error %d", error);
- 		return;
- 	}
-diff --git a/dlm_controld/daemon_cpg.c b/dlm_controld/daemon_cpg.c
-index d88cd467f03a..356e80ddfc67 100644
---- a/dlm_controld/daemon_cpg.c
-+++ b/dlm_controld/daemon_cpg.c
-@@ -1871,7 +1871,7 @@ int set_protocol(void)
- 			 */
- 
- 			error = cpg_dispatch(cpg_handle_daemon, CS_DISPATCH_ONE);
--			if (error != CS_OK)
-+			if (error != CS_OK && error != CS_ERR_BAD_HANDLE)
- 				log_error("daemon cpg_dispatch one error %d", error);
- 		}
- 		if (pollfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
-@@ -2181,7 +2181,7 @@ void process_cpg_daemon(int ci)
- 	cs_error_t error;
- 
- 	error = cpg_dispatch(cpg_handle_daemon, CS_DISPATCH_ALL);
--	if (error != CS_OK)
-+	if (error != CS_OK && error != CS_ERR_BAD_HANDLE)
- 		log_error("daemon cpg_dispatch error %d", error);
- }
- 
--- 
-1.8.3.1
-
diff --git a/SPECS/dlm.spec b/SPECS/dlm.spec
index d1d1d6d..84845e0 100644
--- a/SPECS/dlm.spec
+++ b/SPECS/dlm.spec
@@ -1,6 +1,6 @@
 Name:           dlm
-Version:        4.0.2
-Release:        6%{?dist}
+Version:        4.0.6
+Release:        1%{?dist}
 License:        GPLv2 and GPLv2+ and LGPLv2+
 # For a breakdown of the licensing, see README.license
 Group:          System Environment/Kernel
@@ -14,12 +14,7 @@ BuildRequires:  systemd-units
 BuildRequires:  systemd-devel
 Source0:        http://git.fedorahosted.org/cgit/dlm.git/snapshot/%{name}-%{version}.tar.gz
 
-Patch0: 0001-dlm_stonith-add-man-page.patch
-Patch1: 0002-dlm_stonith-install-man-page.patch
-Patch2: 0003-libdlm-udev-dir-now-under-usr-lib.patch
-Patch3: 0005-dlm_tool-fix-status-printing-in-libdlmcontrol.patch
-Patch4: 0008-dlm-clear-out-addrs-before-calling-into-corosync_cft.patch
-Patch5: 0010-dlm_controld-don-t-log-error-from-cpg_dispatch.patch
+# Patch0: 0001-foo.patch
 
 %if 0%{?rhel}
 ExclusiveArch: i686 x86_64 s390x
@@ -39,12 +34,7 @@ The kernel dlm requires a user daemon to control membership.
 %prep
 %setup -q
 
-%patch0 -p1 -b .0001-dlm_stonith-add-man-page.patch
-%patch1 -p1 -b .0002-dlm_stonith-install-man-page.patch
-%patch2 -p1 -b .0003-libdlm-udev-dir-now-under-usr-lib.patch
-%patch3 -p1 -b .0005-dlm_tool-fix-status-printing-in-libdlmcontrol.patch
-%patch4 -p1 -b .0008-dlm-clear-out-addrs-before-calling-into-corosync_cft.patch
-%patch5 -p1 -b .0010-dlm_controld-don-t-log-error-from-cpg_dispatch.patch
+# %patch0 -p1 -b .0001-foo.patch
 
 %build
 # upstream does not require configure
@@ -116,6 +106,15 @@ developing applications that use %{name}.
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Fri Jun 10 2016 David Teigland <teigland@redhat.com> - 4.0.6-1
+- New upstream release
+
+* Tue Apr 26 2016 David Teigland <teigland@redhat.com> - 4.0.5-1
+- New upstream release
+
+* Mon Feb 29 2016 David Teigland <teigland@redhat.com> - 4.0.4-1
+- New upstream release
+
 * Mon Jul 06 2015 David Teigland <teigland@redhat.com> - 4.0.2-6
 - dlm_controld: don't log error from cpg_dispatch