-/* $OpenBSD: engine.c,v 1.68 2021/03/20 16:46:03 kn Exp $ */
+/* $OpenBSD: engine.c,v 1.69 2021/03/20 17:07:49 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
uint32_t if_index;
uint32_t rdomain;
int running;
+ int autoconf;
int autoconfprivacy;
int soii;
struct ether_addr hw_address;
memset(&cei, 0, sizeof(cei));
cei.if_index = iface->if_index;
cei.running = iface->running;
+ cei.autoconf = iface->autoconf;
cei.autoconfprivacy = iface->autoconfprivacy;
cei.soii = iface->soii;
memcpy(&cei.hw_address, &iface->hw_address, sizeof(struct ether_addr));
iface->rdomain = imsg_ifinfo->rdomain;
iface->running = imsg_ifinfo->running;
iface->link_state = imsg_ifinfo->link_state;
+ iface->autoconf = imsg_ifinfo->autoconf;
iface->autoconfprivacy = imsg_ifinfo->autoconfprivacy;
iface->soii = imsg_ifinfo->soii;
memcpy(&iface->hw_address, &imsg_ifinfo->hw_address,
memcpy(&iface->ll_address, &imsg_ifinfo->ll_address,
sizeof(struct sockaddr_in6));
+ if (iface->autoconf != imsg_ifinfo->autoconf) {
+ iface->autoconf = imsg_ifinfo->autoconf;
+ need_refresh = 1;
+ }
+
if (iface->autoconfprivacy != imsg_ifinfo->autoconfprivacy) {
iface->autoconfprivacy = imsg_ifinfo->autoconfprivacy;
need_refresh = 1;
}
}
- if (!found && duplicate_found && iface->soii) {
+ if (!found && iface->autoconf && duplicate_found && iface->soii) {
prefix->dad_counter++;
log_debug("%s dad_counter: %d", __func__, prefix->dad_counter);
gen_address_proposal(iface, ra, prefix, 0);
- } else if (!found && (iface->soii || prefix->prefix_len <= 64))
+ } else if (!found && iface->autoconf && (iface->soii ||
+ prefix->prefix_len <= 64))
/* new proposal */
gen_address_proposal(iface, ra, prefix, 0);
-/* $OpenBSD: frontend.c,v 1.53 2021/03/20 16:46:03 kn Exp $ */
+/* $OpenBSD: frontend.c,v 1.54 2021/03/20 17:07:49 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
get_xflags(if_name)) == -1)
return;
- if (!(xflags & IFXF_AUTOCONF6))
+ if (!(xflags & (IFXF_AUTOCONF6 | IFXF_AUTOCONF6TEMP)))
return;
if((ifrdomain = get_ifrdomain(if_name)) == -1)
imsg_ifinfo.rdomain = ifrdomain;
imsg_ifinfo.running = (flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP |
IFF_RUNNING);
+ imsg_ifinfo.autoconf = (xflags & IFXF_AUTOCONF6);
imsg_ifinfo.autoconfprivacy = (xflags & IFXF_AUTOCONF6TEMP);
imsg_ifinfo.soii = !(xflags & IFXF_INET6_NOSOII);
if ((xflags = get_xflags(if_name)) == -1)
return;
- if (!(xflags & IFXF_AUTOCONF6))
+ if (!(xflags & (IFXF_AUTOCONF6 | IFXF_AUTOCONF6TEMP)))
return;
memset(&imsg_addrinfo, 0, sizeof(imsg_addrinfo));
&if_index, sizeof(if_index));
} else {
xflags = get_xflags(if_name);
- if (xflags == -1 || !(xflags & IFXF_AUTOCONF6)) {
+ if (xflags == -1 || !(xflags & (IFXF_AUTOCONF6 |
+ IFXF_AUTOCONF6TEMP))) {
log_debug("RTM_IFINFO: %s(%d) no(longer) "
"autoconf6", if_name, ifm->ifm_index);
if_index = ifm->ifm_index;