Blame SOURCES/0026-rh1260727-internal-dhcp6-lease-unref.patch

ab7d06
From 95e8b165a7cf8a9f72ccfbc3ca09833c8e2cdb60 Mon Sep 17 00:00:00 2001
ab7d06
From: Lubomir Rintel <lkundrak@v3.sk>
ab7d06
Date: Thu, 8 Oct 2015 14:55:36 +0200
ab7d06
Subject: [PATCH] systemd,dhcpv6: clean up the lease on client reset
ab7d06
ab7d06
Upstream systemd.git commit 4e3e667 [sd-dhcp6-client: Fix unreferencing
ab7d06
DHCPv6 lease on client reset].
ab7d06
ab7d06
Fixed on master already.
ab7d06
ab7d06
https://bugzilla.redhat.com/show_bug.cgi?id=1260727
ab7d06
---
ab7d06
 .../systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c            | 5 +++++
ab7d06
 1 file changed, 5 insertions(+)
ab7d06
ab7d06
diff --git a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
ab7d06
index 8a17a72..6754fe1 100644
ab7d06
--- a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
ab7d06
+++ b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
ab7d06
@@ -285,6 +285,11 @@ static void client_notify(sd_dhcp6_client *client, int event) {
ab7d06
 static int client_reset(sd_dhcp6_client *client) {
ab7d06
         assert_return(client, -EINVAL);
ab7d06
 
ab7d06
+	if (client->lease) {
ab7d06
+		dhcp6_lease_clear_timers(&client->lease->ia);
ab7d06
+		client->lease = sd_dhcp6_lease_unref(client->lease);
ab7d06
+	}
ab7d06
+
ab7d06
         client->receive_message =
ab7d06
                 sd_event_source_unref(client->receive_message);
ab7d06
 
ab7d06
-- 
ab7d06
2.4.3
ab7d06