Set the back pointer from the prefix to the interface before adding

the prefix to the interface's prefix list.  This shouldn't make a
difference, since rtadvd(8) is single-threaded, but I've seen it crash
in delete_prefix() with pfx_rainfo == NULL, and this is the only place
where a prefix can be added to the list with a NULL pfx_rainfo.

MFC after:	3 days
This commit is contained in:
des 2013-08-23 10:57:05 +00:00
parent 7b6ce3ea58
commit 36b6860de7

View File

@ -1125,9 +1125,9 @@ add_prefix(struct rainfo *rai, struct in6_prefixreq *ipr)
pfx->pfx_onlinkflg = ipr->ipr_raf_onlink; pfx->pfx_onlinkflg = ipr->ipr_raf_onlink;
pfx->pfx_autoconfflg = ipr->ipr_raf_auto; pfx->pfx_autoconfflg = ipr->ipr_raf_auto;
pfx->pfx_origin = PREFIX_FROM_DYNAMIC; pfx->pfx_origin = PREFIX_FROM_DYNAMIC;
pfx->pfx_rainfo = rai;
TAILQ_INSERT_TAIL(&rai->rai_prefix, pfx, pfx_next); TAILQ_INSERT_TAIL(&rai->rai_prefix, pfx, pfx_next);
pfx->pfx_rainfo = rai;
syslog(LOG_DEBUG, "<%s> new prefix %s/%d was added on %s", syslog(LOG_DEBUG, "<%s> new prefix %s/%d was added on %s",
__func__, __func__,