summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormcbride <mcbride@openbsd.org>2002-10-22 00:39:23 +0000
committermcbride <mcbride@openbsd.org>2002-10-22 00:39:23 +0000
commit87869632733eae06ae48d5635edfe18a1bfddc48 (patch)
tree815286a352f4efd3e0d651437c0a0a04d156cfda /sys
parentCheck for null pointer before deref in info output. Based upon (diff)
downloadwireguard-openbsd-87869632733eae06ae48d5635edfe18a1bfddc48.tar.xz
wireguard-openbsd-87869632733eae06ae48d5635edfe18a1bfddc48.zip
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;