File N_When-getting-a-new-lease-send-the-serverID-and-lease-addr-in-a-DHCP_REQUEST-package.patch of Package dhcpcd
From: Egbert Eich <eich@suse.de>
Date: Fri Oct 21 19:30:32 2011 +0200
Subject: [PATCH] When getting a new lease send the serverID and lease addr in a DHCP_REQUEST package.
Patch-Mainline: N/A
Git-commit: a29a820f4fe4dc3b05f4ee1baf344b6b5b8aa25b
References: bnc #725856
Signed-off-by: Egbert Eich <eich@suse.de>
When a lease cannot be renewed dhcpclient tries to get a new lease starting
with a DHCP_DISCOVER. In this case the serverID and lease addr needs to be
sent in the DHCP_REQUEST package. This only happens when the if statement
if (dhcp->address.s_addr &&
dhcp->address.s_addr !=
iface->previous_address.s_addr)
{
is true. Thus iface->previous_address.s_addr needs to be when the lease
renewal fails and we reenter STATE_INIT.
(bnc #725856)
Signed-off-by: Egbert Eich <eich@suse.de>
---
dhcpcd-3.2.3/client.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/dhcpcd-3.2.3/client.c b/dhcpcd-3.2.3/client.c
index fd97908..2671fba 100644
--- a/dhcpcd-3.2.3/client.c
+++ b/dhcpcd-3.2.3/client.c
@@ -798,6 +798,7 @@ static int handle_dhcp (state_t *state, int type, const options_t *options)
state->state = STATE_INIT;
state->timeout = 0;
state->xid = 0;
+ state->interface->previous_address.s_addr = 0;
free_dhcp (dhcp);
memset (dhcp, 0, sizeof (*dhcp));