summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
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