diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-07-16 18:17:28 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-07-16 18:17:28 +0000 |
commit | e6d6ce9be69ad8242a8dc9b2d22cdaaba84ac614 (patch) | |
tree | d9d7684edd938ba72d0fb96e4418f75750217044 /sys/net/route.c | |
parent | 3cd32cddfb3af2de65659dbba3328b5cedccdf69 (diff) |
Fix rn_match and there for the expoerted lookup functions in radix.c
to never return the internal RNF_ROOT nodes. This removes the checks
in the callee to verify that not an RNF_ROOT node was returned.
OK mpi@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 2a06b2e4b27..738b49cb8fb 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.215 2015/06/29 11:04:16 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.216 2015/07/16 18:17:27 claudio Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -307,8 +307,7 @@ rtalloc(struct sockaddr *dst, int flags, unsigned int tableid) info.rti_info[RTAX_DST] = dst; rnh = rtable_get(tableid, dst->sa_family); - if (rnh && (rn = rnh->rnh_matchaddr((caddr_t)dst, rnh)) && - ((rn->rn_flags & RNF_ROOT) == 0)) { + if (rnh && (rn = rnh->rnh_matchaddr((caddr_t)dst, rnh))) { newrt = rt = (struct rtentry *)rn; if ((rt->rt_flags & RTF_CLONING) && ISSET(flags, RT_RESOLVE)) { err = rtrequest1(RTM_RESOLVE, &info, RTP_DEFAULT, |