summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-13 14:21:30 +0000
committershin <shin@FreeBSD.org>2000-01-13 14:21:30 +0000
commitc62774e01e2e424fed9cdb21447a18bdc386fef2 (patch)
tree92b1135ce2e5c8be12cedbd99b8fc573da6bec70 /sys/netinet
parent13880531c2915e958a63aba440d6984fd0f6c5f1 (diff)
downloadFreeBSD-src-c62774e01e2e424fed9cdb21447a18bdc386fef2.zip
FreeBSD-src-c62774e01e2e424fed9cdb21447a18bdc386fef2.tar.gz
Clear rt after RTFREE. This might have sometime caused kernel panic at rtfree()
on INET6 enabled environment.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_subr.c5
-rw-r--r--sys/netinet/tcp_timewait.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 811f34c..9ab1dbd 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -451,14 +451,17 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#ifdef INET6
if (isipv6) {
(void)ip6_output(m, NULL, ro6, ipflags, NULL, NULL);
- if (ro6 == &sro6 && ro6->ro_rt)
+ if (ro6 == &sro6 && ro6->ro_rt) {
RTFREE(ro6->ro_rt);
+ ro6->ro_rt = NULL;
+ }
} else
#endif /* INET6 */
{
(void) ip_output(m, NULL, ro, ipflags, NULL);
if (ro == &sro && ro->ro_rt) {
RTFREE(ro->ro_rt);
+ ro->ro_rt = NULL;
}
}
}
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 811f34c..9ab1dbd 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -451,14 +451,17 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#ifdef INET6
if (isipv6) {
(void)ip6_output(m, NULL, ro6, ipflags, NULL, NULL);
- if (ro6 == &sro6 && ro6->ro_rt)
+ if (ro6 == &sro6 && ro6->ro_rt) {
RTFREE(ro6->ro_rt);
+ ro6->ro_rt = NULL;
+ }
} else
#endif /* INET6 */
{
(void) ip_output(m, NULL, ro, ipflags, NULL);
if (ro == &sro && ro->ro_rt) {
RTFREE(ro->ro_rt);
+ ro->ro_rt = NULL;
}
}
}
OpenPOWER on IntegriCloud