-/* $OpenBSD: engine.c,v 1.34 2017/05/30 15:57:12 florian Exp $ */
+/* $OpenBSD: engine.c,v 1.35 2017/05/30 18:18:08 deraadt Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
void withdraw_dfr(struct dfr_proposal *);
void debug_log_ra(struct imsg_ra *);
char *parse_dnssl(char *, int);
-void update_iface_ra(struct slaacd_iface *, struct radv *);
+void update_iface_ra(struct slaacd_iface *, struct radv *);
void send_proposal(struct imsg_proposal *);
void start_probe(struct slaacd_iface *);
void address_proposal_timeout(int, short, void *);
"privacy: %s", __func__, imsg_ifinfo.if_index,
ether_ntoa(&imsg_ifinfo.hw_address),
imsg_ifinfo.running ? "yes" : "no",
- imsg_ifinfo.autoconfprivacy ? "yes" : "no" );
+ imsg_ifinfo.autoconfprivacy ? "yes" : "no");
iface = get_slaacd_iface_by_id(imsg_ifinfo.if_index);
if (iface == NULL) {
NULL))
evtimer_del(&iface->timer);
}
-
+
memcpy(&iface->ll_address,
&imsg_ifinfo.ll_address,
sizeof(struct sockaddr_in6));
cei_ra.reachable_time = ra->reachable_time;
cei_ra.retrans_time = ra->retrans_time;
engine_imsg_compose_frontend(IMSG_CTL_SHOW_INTERFACE_INFO_RA,
- pid, &cei_ra, sizeof(cei_ra));
+ pid, &cei_ra, sizeof(cei_ra));
LIST_FOREACH(prefix, &ra->prefixes, entries) {
memset(&cei_ra_prefix, 0, sizeof(cei_ra_prefix));
#define EUI64_GBIT 0x01
#define EUI64_UBIT 0x02
- if (privacy) {
+ if (privacy) {
arc4random_buf(&priv_in6.s6_addr32[2], 8);
priv_in6.s6_addr[8] &= ~EUI64_GBIT; /* g bit to "individual" */
priv_in6.s6_addr[8] |= EUI64_UBIT; /* u bit to "local" */
~addr_proposal->mask.s6_addr32[3]);
}
-#undef s6_addr32
+#undef s6_addr32
}
/* from sys/netinet6/in6.c */
return NULL;
}
if (len == 0) {
- if ( pos < datalen && data[pos + 1] != 0)
+ if (pos < datalen && data[pos + 1] != 0)
*nsslp++ = ' '; /* seperator for next domain */
else
break;
sizeof(hbuf));
}
log_debug("%s: iface %d: %s",
- __func__, iface->if_index,
- hbuf);
+ __func__, iface->if_index,
+ hbuf);
break;
}
}
tv.tv_usec = arc4random_uniform(1000000);
evtimer_add(&iface->timer, &tv);
}
- break;
+ break;
case IF_DOWN:
case IF_IDLE:
default:
}
return (NULL);
-
}
struct address_proposal*
*result_ra = ra;
*result_prefix = prefix;
}
-
}
}
}
-/* $OpenBSD: frontend.c,v 1.13 2017/05/29 08:59:42 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.14 2017/05/30 18:18:08 deraadt Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
rs.nd_rs_reserved = 0;
memset(&dst, 0, sizeof(dst));
- dst.sin6_family = AF_INET6;
+ dst.sin6_family = AF_INET6;
if (inet_pton(AF_INET6, ALLROUTER, &dst.sin6_addr.s6_addr) != 1)
fatal("inet_pton");
int shut = 0;
DEBUG_IMSG("%s", __func__);
-
+
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
fatal("imsg_read error");
p = rl->sr_label;
for (ap = argv; ap < &argv[3] && (*ap =
- strsep(&p, " ")) != NULL;) {
+ strsep(&p, " ")) != NULL;) {
if (**ap != '\0')
ap++;
}
-/* $OpenBSD: slaacd.c,v 1.21 2017/05/30 15:39:49 florian Exp $ */
+/* $OpenBSD: slaacd.c,v 1.22 2017/05/30 18:18:08 deraadt Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
pipe_main2frontend[1], debug, cmd_opts & OPT_VERBOSE, csock);
slaacd_process = PROC_MAIN;
-
+
log_procinit(log_procnames[slaacd_process]);
if ((routesock = socket(PF_ROUTE, SOCK_RAW | SOCK_CLOEXEC |
}
memcpy(&in6_addreq.ifra_addr, &address->addr,
- sizeof(in6_addreq.ifra_addr));
+ sizeof(in6_addreq.ifra_addr));
memcpy(&in6_addreq.ifra_prefixmask.sin6_addr, &address->mask,
sizeof(in6_addreq.ifra_prefixmask.sin6_addr));
in6_addreq.ifra_prefixmask.sin6_family = AF_INET6;