[PATCH 04/12] Don't delete vmac interfaces before dropping multicast membership

[email protected] (Quentin Armitage)
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
Further to commit afea07bd94384c8ac8125e8cdbfd18bc4a46b14e, the
dropping multicast memberships were failing, since the vmac
interfaces had already been deleted. This patch keeps the vmac
interfaces until after the IP_DROP_MEMBERSHIP ioctls.

Signed-off-by: Quentin Armitage <[email protected]>
---
 keepalived/vrrp/vrrp_daemon.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/keepalived/vrrp/vrrp_daemon.c b/keepalived/vrrp/vrrp_daemon.c
index 70aed67..07fefaf 100644
--- a/keepalived/vrrp/vrrp_daemon.c
+++ b/keepalived/vrrp/vrrp_daemon.c
@@ -56,9 +56,6 @@ extern char *vrrp_pidfile;
 static void
 stop_vrrp(void)
 {
-	if (!__test_bit(DONT_RELEASE_VRRP_BIT, &debug))
-		shutdown_vrrp_instances();
-
 	/* Clear static entries */
 	netlink_rtlist(vrrp_data->static_routes, IPROUTE_DEL);
 	netlink_rulelist(vrrp_data->static_rules, IPRULE_DEL);
@@ -82,6 +79,10 @@ stop_vrrp(void)
 	/* Clean data */
 	free_global_data(global_data);
 	vrrp_dispatcher_release(vrrp_data);
+
+	if (!__test_bit(DONT_RELEASE_VRRP_BIT, &debug))
+		shutdown_vrrp_instances();
+
 	free_vrrp_data(vrrp_data);
 	free_vrrp_buffer();
 	free_interface_queue();
-- 
1.7.7.6


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.