aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2009-12-21 16:08:23 +0100
committerBjørn Mork <bjorn@mork.no>2010-08-06 15:24:11 +0200
commitb66f3d0e466599c8d6e1497bcdbcd281731d0fe0 (patch)
tree23558e224e921a8c82bd3431e7f90457d01da445
parent3831eee13ddfe6c908c383f872145e6fbf1d0969 (diff)
103_update-ifid-on-restart.diff from the Debian package version 20080615-8:
"Interface ID may have changed between a stop and start." Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r--dhcp6c.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dhcp6c.c b/dhcp6c.c
index c959b7c..edeca80 100644
--- a/dhcp6c.c
+++ b/dhcp6c.c
@@ -768,6 +768,15 @@ client6_ifctl(ifname, command)
switch(command) {
case DHCP6CTL_COMMAND_START:
+ /*
+ * The ifid might have changed, so reset it before releasing the
+ * lease.
+ */
+ if (ifreset(ifp)) {
+ dprintf(LOG_NOTICE, FNAME, "failed to reset %s",
+ ifname);
+ return (-1);
+ }
free_resources(ifp);
if (client6_start(ifp)) {
debug_printf(LOG_NOTICE, FNAME, "failed to restart %s",