summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2002-10-22 00:39:24 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2002-10-22 00:39:24 +0000
commit864ddbd189a7909274fc6aa0512547baff02d90f (patch)
tree9b00e101b2f4d4860b35b4dfb74085e30630914d /sys
parentd90665a3da85f897f6c6e18fada0d2962934bf35 (diff)
check the correct return value from ifunit()
(returns ifp, not ifname) ok dhartmei@ ish@ camield@ henning@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index 6342be1881c..477fd22057c 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.11 2002/10/20 13:08:29 mcbride Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.12 2002/10/22 00:39:23 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -414,7 +414,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
rule->ifp = NULL;
if (rule->rt_ifname[0]) {
rule->rt_ifp = ifunit(rule->rt_ifname);
- if (rule->rt_ifname == NULL) {
+ if (rule->rt_ifp == NULL) {
pool_put(&pf_rule_pl, rule);
error = EINVAL;
break;
@@ -551,7 +551,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
newrule->ifp = NULL;
if (newrule->rt_ifname[0]) {
newrule->rt_ifp = ifunit(newrule->rt_ifname);
- if (newrule->rt_ifname == NULL) {
+ if (newrule->rt_ifp == NULL) {
pool_put(&pf_rule_pl, newrule);
error = EINVAL;
break;