-/* $OpenBSD: dhcpd.h,v 1.164 2017/04/04 15:15:48 krw Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.165 2017/04/05 18:22:30 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
int resolv_conf_priority(struct interface_info *);
-void sendhup(struct client_lease *);
-
void flush_unpriv_ibuf(const char *);
-/* $OpenBSD: dispatch.c,v 1.118 2017/04/04 15:15:48 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.119 2017/04/05 18:22:30 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
struct dhcp_timeout timeout;
void packethandler(struct interface_info *ifi);
+void sendhup(struct client_lease *);
void
get_hw_address(struct interface_info *ifi)
close(s);
return rv;
}
+
+/*
+ * Inform the [priv] process a HUP was received and it should restart.
+ */
+void
+sendhup(struct client_lease *active)
+{
+ struct imsg_hup imsg;
+ int rslt;
+
+ if (active)
+ imsg.addr = active->address;
+ else
+ imsg.addr.s_addr = INADDR_ANY;
+
+ rslt = imsg_compose(unpriv_ibuf, IMSG_HUP, 0, 0, -1,
+ &imsg, sizeof(imsg));
+ if (rslt == -1)
+ log_warn("sendhup: imsg_compose");
+
+ flush_unpriv_ibuf("sendhup");
+}
-/* $OpenBSD: kroute.c,v 1.85 2017/03/08 15:07:32 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.86 2017/04/05 18:22:31 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
active_addr = imsg->addr;
}
-/*
- * Inform the [priv] process a HUP was received and it should restart.
- */
-void
-sendhup(struct client_lease *active)
-{
- struct imsg_hup imsg;
- int rslt;
-
- if (active)
- imsg.addr = active->address;
- else
- imsg.addr.s_addr = INADDR_ANY;
-
- rslt = imsg_compose(unpriv_ibuf, IMSG_HUP, 0, 0, -1,
- &imsg, sizeof(imsg));
- if (rslt == -1)
- log_warn("sendhup: imsg_compose");
-
- flush_unpriv_ibuf("sendhup");
-}
-
/*
* priv_cleanup removes dhclient installed routes and address.
*/