mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
fix(sys-apps/systemd): add dhcp fix for gce
Thanks to Tom Gundersen for the quick fix.
This commit is contained in:
parent
66760e1293
commit
650c8e50b5
@ -15,8 +15,6 @@ IUSE=""
|
||||
# no source directory
|
||||
S="${WORKDIR}"
|
||||
|
||||
RDEPEND="dev-lang/python"
|
||||
|
||||
src_install() {
|
||||
into "/"
|
||||
dobin ${FILESDIR}/gce-ssh-key
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 7bf2f4397255bc8f6cf20a0f2adab4c984ea7d14 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Wed, 19 Mar 2014 10:41:29 +0100
|
||||
Subject: [PATCH] sd-dhcp-client: accept infinite lease lifetime
|
||||
|
||||
Otherwise we would fail with -EINVAL. Thanks to Brandon Philips
|
||||
<brandon.philips@coreos.com>, for reporting the bug.
|
||||
---
|
||||
src/libsystemd-network/sd-dhcp-client.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
|
||||
index 8411141..ce375dd 100644
|
||||
--- a/src/libsystemd-network/sd-dhcp-client.c
|
||||
+++ b/src/libsystemd-network/sd-dhcp-client.c
|
||||
@@ -747,6 +747,10 @@ static int client_set_lease_timeouts(sd_dhcp_client *client, uint64_t usec) {
|
||||
assert(client);
|
||||
assert(client->event);
|
||||
|
||||
+ /* don't set timers for infinite leases */
|
||||
+ if (client->lease->lifetime == 0xffffffff)
|
||||
+ return 0;
|
||||
+
|
||||
if (client->lease->lifetime < 10)
|
||||
return -EINVAL;
|
||||
|
||||
--
|
||||
1.8.5.2 (Apple Git-48)
|
||||
|
@ -132,6 +132,9 @@ src_prepare() {
|
||||
# dns feature for more than one server
|
||||
epatch "${FILESDIR}"/211-networkd-allow-more-than-one-static-dns-server.patch
|
||||
|
||||
# patch to fix dhcp on gce
|
||||
epatch "${FILESDIR}"/211-0001-sd-dhcp-client-accept-infinite-lease-lifetime.patch
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
if use doc; then
|
||||
gtkdocize --docdir docs/ || die
|
Loading…
Reference in New Issue
Block a user