Clear rt after RTFREE. This might have sometime caused kernel panic at rtfree()

on INET6 enabled environment.
This commit is contained in:
shin 2000-01-13 14:21:30 +00:00
parent e2c71771f6
commit b815108bf5
2 changed files with 8 additions and 2 deletions

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}