summaryrefslogtreecommitdiff
path: root/sys/net/pfvar.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/pfvar.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/pfvar.h')
-rw-r--r--sys/net/pfvar.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index 9952de3cf69..d60d52983c4 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfvar.h,v 1.285 2009/04/06 12:05:55 henning Exp $ */
+/* $OpenBSD: pfvar.h,v 1.286 2009/05/18 20:37:13 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -796,7 +796,7 @@ struct pf_state {
/* XXX */
u_int8_t sync_updates;
- int16_t rtableid;
+ int rtableid;
u_int8_t min_ttl;
u_int8_t set_tos;
u_int16_t max_mss;