-/* $OpenBSD: engine.c,v 1.35 2017/05/30 18:18:08 deraadt Exp $ */
+/* $OpenBSD: engine.c,v 1.36 2017/05/31 07:14:58 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
int shut = 0, verbose;
uint32_t if_index;
- DEBUG_IMSG("%s", __func__);
-
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_READ, n=%ld", __func__, n);
}
if (event & EV_WRITE) {
if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_WRITE, n=%ld", __func__, n);
}
for (;;) {
if (n == 0) /* No more messages. */
break;
- DEBUG_IMSG("%s: %s", __func__, imsg_type_name[imsg.hdr.type]);
-
switch (imsg.hdr.type) {
case IMSG_CTL_LOG_VERBOSE:
/* Already checked by frontend. */
fatal("%s: IMSG_UPDATE_IF wrong length: %d",
__func__, imsg.hdr.len);
memcpy(&imsg_ifinfo, imsg.data, sizeof(imsg_ifinfo));
- DEBUG_IMSG("%s: IMSG_UPDATE_IF: %d[%s], running: %s, "
- "privacy: %s", __func__, imsg_ifinfo.if_index,
- ether_ntoa(&imsg_ifinfo.hw_address),
- imsg_ifinfo.running ? "yes" : "no",
- imsg_ifinfo.autoconfprivacy ? "yes" : "no");
iface = get_slaacd_iface_by_id(imsg_ifinfo.if_index);
if (iface == NULL) {
- DEBUG_IMSG("%s: new interface: %d", __func__,
- imsg_ifinfo.if_index);
if ((iface = calloc(1, sizeof(*iface))) == NULL)
fatal("calloc");
evtimer_set(&iface->timer, iface_timeout,
LIST_INIT(&iface->dfr_proposals);
} else {
int need_refresh = 0;
- DEBUG_IMSG("%s: updating %d", __func__,
- imsg_ifinfo.if_index);
if (iface->autoconfprivacy !=
imsg_ifinfo.autoconfprivacy) {
fatal("%s: IMSG_REMOVE_IF wrong length: %d",
__func__, imsg.hdr.len);
memcpy(&if_index, imsg.data, sizeof(if_index));
- DEBUG_IMSG("%s: IMSG_REMOVE_IF: %d", __func__,
- if_index);
remove_slaacd_iface(if_index);
break;
case IMSG_RA:
fatal("%s: IMSG_RA wrong length: %d",
__func__, imsg.hdr.len);
memcpy(&ra, imsg.data, sizeof(ra));
- DEBUG_IMSG("%s: IMSG_RA: %d", __func__, ra->if_index);
iface = get_slaacd_iface_by_id(ra.if_index);
if (iface != NULL)
parse_ra(iface, &ra);
ssize_t n;
int shut = 0;
- DEBUG_IMSG("%s", __func__);
-
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_READ, n=%ld", __func__, n);
}
if (event & EV_WRITE) {
if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_WRITE, n=%ld", __func__, n);
}
for (;;) {
if (n == 0) /* No more messages. */
break;
- DEBUG_IMSG("%s: %s", __func__, imsg_type_name[imsg.hdr.type]);
switch (imsg.hdr.type) {
case IMSG_SOCKET_IPC:
/*
-/* $OpenBSD: frontend.c,v 1.15 2017/05/30 19:27:16 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.16 2017/05/31 07:14:58 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
ssize_t n;
int shut = 0;
- DEBUG_IMSG("%s", __func__);
-
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_READ, n=%ld", __func__, n);
}
if (event & EV_WRITE) {
if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_WRITE, n=%ld", __func__, n);
}
for (;;) {
if (n == 0) /* No more messages. */
break;
-
- DEBUG_IMSG("%s: %s", __func__, imsg_type_name[imsg.hdr.type]);
switch (imsg.hdr.type) {
case IMSG_SOCKET_IPC:
/*
int shut = 0;
uint32_t if_index;
- DEBUG_IMSG("%s", __func__);
-
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_READ, n=%ld", __func__, n);
}
if (event & EV_WRITE) {
if ((n = msgbuf_write(&ibuf->w)) == -1 && errno != EAGAIN)
fatal("msgbuf_write");
if (n == 0) /* Connection closed. */
shut = 1;
- DEBUG_IMSG("%s: EV_WRITE, n=%ld", __func__, n);
}
for (;;) {
if (n == 0) /* No more messages. */
break;
- DEBUG_IMSG("%s: %s", __func__, imsg_type_name[imsg.hdr.type]);
-
switch (imsg.hdr.type) {
case IMSG_CTL_END:
case IMSG_CTL_SHOW_INTERFACE_INFO: