diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-05-20 20:43:58 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-05-20 20:43:58 +0000 |
commit | 723250cfe67564c0004fae334b8a0c5806730efa (patch) | |
tree | 91f4d9c65bff5f71f2e443e2ade4a9cf4118ecbe /sys/net | |
parent | 62967829457885d0519274d008186b28a7ee7a7d (diff) |
don't panic if the address familiy is not found in the rt_tables
ok henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index f028152f8b5..d7a59ffea06 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.72 2006/04/26 17:02:13 claudio Exp $ */ +/* $OpenBSD: route.c,v 1.73 2006/05/20 20:43:57 reyk Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1138,7 +1138,8 @@ rt_lookup(struct sockaddr *dst, struct sockaddr *mask, int tableid) { struct radix_node_head *rnh; - rnh = rt_gettable(dst->sa_family, tableid); + if ((rnh = rt_gettable(dst->sa_family, tableid)) == NULL) + return (NULL); return (rnh->rnh_lookup(dst, mask, rnh)); } |