summaryrefslogtreecommitdiffstats
path: root/sys/net/route.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-15 07:27:12 +0000
committershin <shin@FreeBSD.org>2000-01-15 07:27:12 +0000
commitc19b5290ce3653764884100bbbb5504338cb2068 (patch)
treed04cac579463b23c780d51b6f23d14d84ff916e9 /sys/net/route.c
parentd18a5f50992785bf708dbc5a6c2d96194863b25e (diff)
downloadFreeBSD-src-c19b5290ce3653764884100bbbb5504338cb2068.zip
FreeBSD-src-c19b5290ce3653764884100bbbb5504338cb2068.tar.gz
Clear ro->ro_rt just after RTFREE().
Pleases let me make sure that no one touch the invalid ro_rt pointer, after splx(s) and before next ro_rt initialization. Though usually this seems to be already called at splnet, I still sometime experience kernel crash at rtfree() in my INET6 enabled environment where IPv6 connection is frequently used. (Off-course, it might be just due to another bug.)
Diffstat (limited to 'sys/net/route.c')
-rw-r--r--sys/net/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index f2b187f..3a8c887 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -105,6 +105,7 @@ rtalloc_ign(ro, ignore)
/* XXX - We are probably always at splnet here already. */
s = splnet();
RTFREE(rt);
+ ro->ro_rt = NULL;
splx(s);
}
ro->ro_rt = rtalloc1(&ro->ro_dst, 1, ignore);
OpenPOWER on IntegriCloud