From: Roy Marples Date: Mon, 22 Oct 2007 16:03:48 +0000 (+0000) Subject: Don't release a link local address. X-Git-Tag: v3.2.3~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b7dbb220432d9221a959fcddc0a806474d3b08f;p=thirdparty%2Fdhcpcd.git Don't release a link local address. --- diff --git a/ChangeLog b/ChangeLog index 6d2d69d4..b933aff2 100644 --- 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. diff --git a/client.c b/client.c index 549a6735..33e29979 100644 --- 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