.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 30, 2014
+.Dd March 18, 2014
.Dt DHCPCD.CONF 5
.Os
.Sh NAME
receives an IPv6 RA,
.Nm dhcpcd
will only fork to the background if the RA contains at least one unexpired
-RDNSS option.
+RDNSS option and a valid prefix or no DHCPv6 instruction.
Set this option so to make
.Nm dhcpcd
always fork on an RA.
static int
ipv6nd_scriptrun(struct ra *rap)
{
- int hasdns;
+ int hasdns, hasaddress, pid;
struct ipv6_addr *ap;
const struct ra_opt *rao;
+ hasaddress = 0;
/* If all addresses have completed DAD run the script */
TAILQ_FOREACH(ap, &rap->addrs, next) {
if ((ap->flags & (IPV6_AF_ONLINK | IPV6_AF_AUTOCONF)) ==
(IPV6_AF_ONLINK | IPV6_AF_AUTOCONF))
{
+ hasaddress = 1;
if (!(ap->flags & IPV6_AF_DADCOMPLETED) &&
ipv6_findaddr(ap->iface, &ap->addr))
ap->flags |= IPV6_AF_DADCOMPLETED;
}
script_runreason(rap->iface, "ROUTERADVERT");
- if (hasdns)
- hasdns = daemonise(rap->iface->ctx);
+ pid = 0;
+ if (hasdns && (hasaddress ||
+ !(rap->flags & (ND_RA_FLAG_MANAGED | ND_RA_FLAG_OTHER))))
+ pid = daemonise(rap->iface->ctx);
#if 0
else if (options & DHCPCD_DAEMONISE &&
!(options & DHCPCD_DAEMONISED) && new_data)
ifp->name);
}
#endif
- return hasdns;
+ return pid;
}
static void