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:37:37 +0200
commit35a72f9708bccef6092e37cdb2e31faf7ec04803 (patch)
tree23558e224e921a8c82bd3431e7f90457d01da445
parentaeedae61d12778c4428a7e266913221269480162 (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",