summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorjasoni <jasoni@cvs.openbsd.org>2001-12-18 00:14:21 +0000
committerjasoni <jasoni@cvs.openbsd.org>2001-12-18 00:14:21 +0000
commit31a91a5e6310b316f1d80be5e71ac72fddc77043 (patch)
tree67910aba9b0676a9bb00a2648c5bc202e1201220 /sys
parentd7dc541c3ea8cc5531a39e3010f9562d521c1224 (diff)
Update rt_ifp in DIOCCHANGERULE.
- noticed by DJ Gregor <gregor.7@osu.edu>
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 11dfd4161e7..864b42576e1 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.179 2001/12/11 03:08:47 jasoni Exp $ */
+/* $OpenBSD: pf.c,v 1.180 2001/12/18 00:14:20 jasoni Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1250,6 +1250,15 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
break;
}
}
+ newrule->rt_ifp = NULL;
+ if (newrule->rt_ifname[0]) {
+ newrule->rt_ifp = ifunit(newrule->rt_ifname);
+ if (newrule->rt_ifname == NULL) {
+ pool_put(&pf_rule_pl, newrule);
+ error = EINVAL;
+ break;
+ }
+ }
newrule->evaluations = newrule->packets = 0;
newrule->bytes = 0;
}