diff options
author | 2002-11-23 07:52:54 +0000 | |
---|---|---|
committer | 2002-11-23 07:52:54 +0000 | |
commit | 85155ca722569fcfdbbe109898c875175e152164 (patch) | |
tree | 4c1c5598e6b04ed10cb5e6ffa9d090db70b4271d | |
parent | clean up comments. (diff) | |
download | wireguard-openbsd-85155ca722569fcfdbbe109898c875175e152164.tar.xz wireguard-openbsd-85155ca722569fcfdbbe109898c875175e152164.zip |
don't try to do ioctl with pfctl -n
ok dhartmei@
-rw-r--r-- | sbin/pfctl/pfctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 115b6cc9ed8..1df681ee79d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.88 2002/11/23 05:22:24 mcbride Exp $ */ +/* $OpenBSD: pfctl.c,v 1.89 2002/11/23 07:52:54 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -653,8 +653,10 @@ pfctl_add_pool(struct pfctl *pf, struct pf_pool *p, sa_family_t af) { struct pf_pooladdr *pa; - if (ioctl(pf->dev, DIOCBEGINADDRS, &pf->paddr.ticket)) - err(1, "DIOCBEGINADDRS"); + if ((pf->opts & PF_OPT_NOACTION) == 0) { + if (ioctl(pf->dev, DIOCBEGINADDRS, &pf->paddr.ticket)) + err(1, "DIOCBEGINADDRS"); + } pf->paddr.af = af; TAILQ_FOREACH(pa, &p->list, entries) { |