summaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2009-05-18 20:37:14 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2009-05-18 20:37:14 +0000
commit24d31a5aef766e9feb1e419c01f3ce0cb1fce839 (patch)
treec2e1d737c23f816292ee3db30386558a7376d3ef /sys/net/route.h
parenta86f52df1b164dce52103854d9c0f6dcc01308e0 (diff)
The routing table index rtableid has type unsigned int in the routing
code. In pf rtableid == -1 means don't change the rtableid because of this rule. So it has to be signed int there. Before the value is passed from pf to route it is always checked to be >= 0. Change the type to int in pf and to u_int in netinet and netinet6 to make the checks work. Otherwise -1 may be used as an array index and the kernel crashes. ok henning@
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index b24598624ab..cb151fdfee3 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.60 2009/03/31 01:31:26 dlg Exp $ */
+/* $OpenBSD: route.h,v 1.61 2009/05/18 20:37:13 bluhm Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -430,6 +430,6 @@ void rt_if_track(struct ifnet *);
int rtdeletemsg(struct rtentry *, u_int);
struct radix_node_head *rt_gettable(sa_family_t, u_int);
-struct radix_node *rt_lookup(struct sockaddr *, struct sockaddr *, int);
+struct radix_node *rt_lookup(struct sockaddr *, struct sockaddr *, u_int);
#endif /* _KERNEL */
#endif /* _NET_ROUTE_H_ */