summaryrefslogtreecommitdiff
path: root/sys/netinet6/udp6_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/udp6_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/udp6_output.c')
-rw-r--r--sys/netinet6/udp6_output.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 13e7f2249da..61144b81bfc 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.37 2015/09/11 08:17:06 claudio Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.38 2015/10/19 12:11:28 mpi Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -208,8 +208,7 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6,
#endif
ip6->ip6_nxt = IPPROTO_UDP;
ifp = NULL;
- if (in6p->inp_route6.ro_rt &&
- in6p->inp_route6.ro_rt->rt_flags & RTF_UP)
+ if (rtisvalid(in6p->inp_route6.ro_rt))
ifp = in6p->inp_route6.ro_rt->rt_ifp;
ip6->ip6_hlim = in6_selecthlim(in6p, ifp);
ip6->ip6_src = *laddr;