summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/pf.c')
-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;
}