]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't release a link local address.
authorRoy Marples <roy@marples.name>
Mon, 22 Oct 2007 16:03:48 +0000 (16:03 +0000)
committerRoy Marples <roy@marples.name>
Mon, 22 Oct 2007 16:03:48 +0000 (16:03 +0000)
ChangeLog
client.c

index 6d2d69d4de01467b80708e93fc7dacb2410cc87d..b933aff2315d71a1040e75a65c26fbbeab1124c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+Don't release a link local address.
 Use sysconf to detect if we have a working monotonic clock.
 Only request NTP, NIS, etc if we have compiled that feature in.
 dhcpcd --version now shows what compile time options were used.
index 549a673528abefa9e53f0ea892fb2f527392e194..33e29979af516e05a136509dd1cb442a2fb4a6ba 100644 (file)
--- a/client.c
+++ b/client.c
@@ -470,11 +470,13 @@ int dhcp_run (const options_t *options, int *pidfd)
                                                || state == STATE_REBINDING)
                                        {
                                                logger (LOG_INFO, "received SIGHUP, releasing lease");
-                                               SOCKET_MODE (SOCKET_OPEN);
-                                               xid = random ();
-                                               if ((open_socket (iface, false)) >= 0)
-                                                       SEND_MESSAGE (DHCP_RELEASE);
-                                               SOCKET_MODE (SOCKET_CLOSED);
+                                               if (! IN_LINKLOCAL (dhcp->address.s_addr)) {
+                                                       SOCKET_MODE (SOCKET_OPEN);
+                                                       xid = random ();
+                                                       if ((open_socket (iface, false)) >= 0)
+                                                               SEND_MESSAGE (DHCP_RELEASE);
+                                                       SOCKET_MODE (SOCKET_CLOSED);
+                                               }
                                                unlink (iface->infofile);
                                        }
                                        else