Blob Blame History Raw
From dcb5af32ea618c42e353f399962bdd6dc1c8a7d9 Mon Sep 17 00:00:00 2001
From: Quentin Armitage <quentin@armitage.org.uk>
Date: Mon, 27 Mar 2017 20:44:50 +0100
Subject: [PATCH 3/3] Don't attempt to remove ipsets if ipset handling not
 initialised

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
---
 keepalived/vrrp/vrrp_ipset.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/keepalived/vrrp/vrrp_ipset.c b/keepalived/vrrp/vrrp_ipset.c
index 1c3e4990..b40bc836 100644
--- a/keepalived/vrrp/vrrp_ipset.c
+++ b/keepalived/vrrp/vrrp_ipset.c
@@ -270,6 +270,11 @@ bool remove_ipsets(void)
 	if (!global_data->using_ipsets)
 		return true;
 
+#ifdef _LIBIPSET_DYNAMIC_
+	if (!libipset_handle)
+		return true;
+#endif
+
 	session = ipset_session_init(printf);
 	if (!session) {
 		log_message(LOG_INFO, "Cannot initialize ipset session.");
-- 
2.13.5