summaryrefslogtreecommitdiff
path: root/sys/net/pf_ioctl.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-27 15:20:31 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-27 15:20:31 +0000
commit096cd01a243d5e2b532ed9b5220949f0bb021021 (patch)
tree801f4a7237d7597eab0d7c9ef2ead22517614fae /sys/net/pf_ioctl.c
parentbaa77e1557a24fc534e3d546ef31d6d82f32d65a (diff)
Initialize rt_ifp in newly allocated pf_state objects to NULL.
Solves the crashes in pf_route() with -current. Reports from Michael Lucas and Bjorn Runaker.
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r--sys/net/pf_ioctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index ec8e2456180..bf370b2ec6e 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.31 2002/12/23 13:15:18 mcbride Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.32 2002/12/27 15:20:30 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -891,6 +891,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
bcopy(&ps->state, state, sizeof(struct pf_state));
state->rule.ptr = NULL;
state->nat_rule = NULL;
+ state->rt_ifp = NULL;
state->creation = time.tv_sec;
state->expire += state->creation;
state->packets = 0;