summaryrefslogtreecommitdiff
path: root/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-11-24 03:23:31 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-11-24 03:23:31 -0200
commit86f6b5b4aa49d8dd6d605296b735ab7bd9075459 (patch)
treec778cad0787fe5e540aa581350a2dfc3c1e9d8bb /pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch
parent940326a85675d7ad682db7cc2ef9539e876b4dfb (diff)
parentb19aa2f64b1d83caef5baef1c21c3303b5cbd6f9 (diff)
Merge branch 'master' of ssh://projects.parabola.nu/~git/abslibre
Diffstat (limited to 'pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch')
-rw-r--r--pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch b/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch
new file mode 100644
index 000000000..3d72b5df2
--- /dev/null
+++ b/pcr/systemd-knock/0001-sd-dhcp-client-clean-up-raw-socket-sd_event_source-w.patch
@@ -0,0 +1,31 @@
+From d5a248dbe933c5cbe3ba3d0c5eb8a035018ba6af Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Thu, 30 Oct 2014 14:23:00 -0500
+Subject: [PATCH] sd-dhcp-client: clean up raw socket sd_event_source when
+ creating new UDP socket
+
+The raw socket sd_event_source used for DHCP server solicitations
+was simply dropped on the floor when creating the new UDP socket
+after a lease has been acquired. Clean it up properly so we're
+not still listening and responding to events on it.
+---
+ src/libsystemd-network/sd-dhcp-client.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
+index 0eba4c3..1f7f238 100644
+--- a/src/libsystemd-network/sd-dhcp-client.c
++++ b/src/libsystemd-network/sd-dhcp-client.c
+@@ -1269,6 +1269,9 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
+ if (r >= 0) {
+ client->timeout_resend =
+ sd_event_source_unref(client->timeout_resend);
++ client->receive_message =
++ sd_event_source_unref(client->receive_message);
++ client->fd = asynchronous_close(client->fd);
+
+ if (IN_SET(client->state, DHCP_STATE_REQUESTING,
+ DHCP_STATE_REBOOTING))
+--
+2.1.3
+