From be22116353547af491dd9db9fe55348f9bad94d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 23 Aug 2013 10:57:05 +0000 Subject: [PATCH] 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 --- usr.sbin/rtadvd/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index bb4aaecf84a..02a241d7066 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -1125,9 +1125,9 @@ add_prefix(struct rainfo *rai, struct in6_prefixreq *ipr) pfx->pfx_onlinkflg = ipr->ipr_raf_onlink; pfx->pfx_autoconfflg = ipr->ipr_raf_auto; pfx->pfx_origin = PREFIX_FROM_DYNAMIC; + pfx->pfx_rainfo = rai; 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", __func__,