summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvd
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2013-08-23 10:57:05 +0000
committerdes <des@FreeBSD.org>2013-08-23 10:57:05 +0000
commit36b6860de720f65bbf5bd58fa6435e5c713f0f48 (patch)
treea522b4b963b1f09ab0f665f47c5b979833087729 /usr.sbin/rtadvd
parent7b6ce3ea58e65e172ca1ad959eccacbed50fab30 (diff)
downloadFreeBSD-src-36b6860de720f65bbf5bd58fa6435e5c713f0f48.zip
FreeBSD-src-36b6860de720f65bbf5bd58fa6435e5c713f0f48.tar.gz
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
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r--usr.sbin/rtadvd/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index bb4aaec..02a241d 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__,
OpenPOWER on IntegriCloud