#endif
// Evaluate hybrid mode for master
- struct interface *master = NULL, *i;
+ struct interface *master = NULL, *i, *n;
list_for_each_entry(i, &interfaces, head) {
if (!i->master)
continue;
}
- list_for_each_entry(i, &interfaces, head) {
+ list_for_each_entry_safe(i, n, &interfaces, head) {
if (i->inuse && !i->ignore) {
// Resolve hybrid mode
if (i->dhcpv6 == RELAYD_HYBRID)
uint8_t pad2;
uint32_t lifetime;
uint8_t name[];
- } *search = malloc(sizeof(*search) + search_padded);
+ } *search = alloca(sizeof(*search) + search_padded);
search->type = ND_OPT_DNS_SEARCH;
search->len = search_len ? ((sizeof(*search) + search_padded) / 8) : 0;
search->pad = 0;
struct sockaddr_in6 all_nodes = {AF_INET6, 0, 0, ALL_IPV6_NODES, 0};
odhcpd_send(router_event.uloop.fd,
&all_nodes, iov, ARRAY_SIZE(iov), iface);
- free(search);
// Rearm timer
int msecs;