}
static void
-dhcp6_freedrop(struct interface *ifp, int drop)
+dhcp6_freedrop(struct interface *ifp, int drop, const char *reason)
{
struct dhcp6_state *state;
state = D6_STATE(ifp);
if (state) {
dhcp6_freedrop_addrs(ifp, drop);
- if (drop && state->new)
- run_script_reason(ifp, "STOP6");
+ if (drop && state->new) {
+ if (reason == NULL)
+ reason = "STOP6";
+ run_script_reason(ifp, reason);
+ }
free(state->send);
free(state->recv);
free(state->new);
}
void
-dhcp6_drop(struct interface *ifp)
+dhcp6_drop(struct interface *ifp, const char *reason)
{
- dhcp6_freedrop(ifp, 1);
+ dhcp6_freedrop(ifp, 1, reason);
}
void
dhcp6_free(struct interface *ifp)
{
- dhcp6_freedrop(ifp, 0);
+ dhcp6_freedrop(ifp, 0, NULL);
}
ssize_t
ssize_t dhcp6_env(char **, const char *, const struct interface *,
const struct dhcp6_message *, ssize_t);
void dhcp6_free(struct interface *);
-void dhcp6_drop(struct interface *);
+void dhcp6_drop(struct interface *, const char *);
#endif
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 6, 2012
+.Dd November 11, 2012
.Dt DHCPCD-RUN-HOOKS 8
.Os
.Sh NAME
dhcpcd is monitoring the interface for a 3rd party to give it an IP address.
.It Dv TIMEOUT
dhcpcd failed to contact any DHCP servers but was able to use an old lease.
-.It Dv EXPIRE
+.It Dv EXPIRE | EXPIRE6
dhcpcd's lease or state expired and it failed to obtain a new one.
.It Dv RELEASE
dhcpcd's lease was released back to the DHCP server for re-use.
else
ifaces = ifp->next;
- dhcp6_drop(iface);
+ dhcp6_drop(iface, NULL);
ipv6rs_drop(iface);
if (strcmp(iface->state->reason, "RELEASE") != 0)
drop_dhcp(iface, "STOP");
syslog(LOG_INFO, "%s: carrier lost", iface->name);
close_sockets(iface);
delete_timeouts(iface, start_expire, NULL);
- dhcp6_drop(iface);
+ dhcp6_drop(iface, "EXPIRE6");
ipv6rs_drop(iface);
drop_dhcp(iface, "NOCARRIER");
}