summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-19 12:11:29 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-19 12:11:29 +0000
commit8f249466be6879ec5a0ba6ea09061267cd9ab8fe (patch)
tree88abdf68d09c8f134daeeb60d236bdf0a0cc7276 /sys/netinet6/ip6_output.c
parent4f78e3787ba6462d3053a56c381eb5f6df17e6b8 (diff)
Stop checking for RTF_UP directly, call rtisvalid(9) instead.
While here add two missing ``rtableid'' checks in in6_selectsrc(). ok bluhm@
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index efa01519c11..a3cae036bc1 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.189 2015/09/23 08:49:46 mpi Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.190 2015/10/19 12:11:28 mpi Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -1151,9 +1151,9 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
/* The first hop and the final destination may differ. */
struct sockaddr_in6 *sa6_dst = &ro_pmtu->ro_dst;
- if (ro_pmtu->ro_rt &&
- ((ro_pmtu->ro_rt->rt_flags & RTF_UP) == 0 ||
- !IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst))) {
+ if (!rtisvalid(ro_pmtu->ro_rt) ||
+ (ro_pmtu->ro_tableid != ifp->if_rdomain) ||
+ !IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst)) {
rtfree(ro_pmtu->ro_rt);
ro_pmtu->ro_rt = NULL;
}