diff options
author | 2002-11-23 07:54:45 +0000 | |
---|---|---|
committer | 2002-11-23 07:54:45 +0000 | |
commit | c0f0a0c66e2ec8c32bdbe67492ea2bc55fc74e66 (patch) | |
tree | e11a6a3576015aa3633f50ad452357cf8d08605d | |
parent | don't try to do ioctl with pfctl -n (diff) | |
download | wireguard-openbsd-c0f0a0c66e2ec8c32bdbe67492ea2bc55fc74e66.tar.xz wireguard-openbsd-c0f0a0c66e2ec8c32bdbe67492ea2bc55fc74e66.zip |
don't try to do ioctl with PF_OPT_NOACTION
does not impact fuction of authpf, but make it consistent with the rest of
the add_* family
ok dhartmei@
-rw-r--r-- | usr.sbin/authpf/authpf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c index 3327229e34c..e6767b8a82b 100644 --- a/usr.sbin/authpf/authpf.c +++ b/usr.sbin/authpf/authpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authpf.c,v 1.28 2002/11/23 05:27:19 mcbride Exp $ */ +/* $OpenBSD: authpf.c,v 1.29 2002/11/23 07:54:45 mcbride Exp $ */ /* * Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org). @@ -751,8 +751,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) { |