summaryrefslogtreecommitdiff
path: root/sys/net/pf_ioctl.c
diff options
context:
space:
mode:
authorCedric Berger <cedric@cvs.openbsd.org>2003-07-19 13:08:59 +0000
committerCedric Berger <cedric@cvs.openbsd.org>2003-07-19 13:08:59 +0000
commitaffd738f0531e9799db4ec0d6dec94381e6c19b3 (patch)
tree2bd0b193976df3d86fdb205ea4ba95fe2bc49745 /sys/net/pf_ioctl.c
parentcc66adb3b35ed88b028cac1c966ecbaafb704f56 (diff)
Simplify struct pf_pooladdr to include struct pf_addr_wrap directly
instead of indirectly trough struct pf_rule_addr. Ryan McBride says: If I'm not mistaken, the code _used_ to use the ports in pf_rule_addr as well. The code was changed to fix some of the bugs with port ranges, but it was too late in the release cycle to make kernel API changes, so the structure was left as is. Needless to say: KERNEL/USERLAND SYNC REQUIRED. ok henning@ mcbride@
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r--sys/net/pf_ioctl.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c
index bc07c0ae7b0..2b38f3152b2 100644
--- a/sys/net/pf_ioctl.c
+++ b/sys/net/pf_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_ioctl.c,v 1.75 2003/06/30 19:09:25 henning Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.76 2003/07/19 13:08:58 cedric Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -382,7 +382,7 @@ pf_empty_pool(struct pf_palist *poola)
struct pf_pooladdr *empty_pool_pa;
while ((empty_pool_pa = TAILQ_FIRST(poola)) != NULL) {
- pf_dynaddr_remove(&empty_pool_pa->addr.addr);
+ pf_dynaddr_remove(&empty_pool_pa->addr);
TAILQ_REMOVE(poola, empty_pool_pa, entries);
pool_put(&pf_pooladdr_pl, empty_pool_pa);
}
@@ -1646,8 +1646,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
break;
}
#endif /* INET6 */
- if (pp->addr.addr.addr.type != PF_ADDR_ADDRMASK &&
- pp->addr.addr.addr.type != PF_ADDR_DYNIFTL) {
+ if (pp->addr.addr.type != PF_ADDR_ADDRMASK &&
+ pp->addr.addr.type != PF_ADDR_DYNIFTL) {
error = EINVAL;
break;
}
@@ -1665,8 +1665,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
break;
}
}
- if (pf_dynaddr_setup(&pa->addr.addr, pp->af)) {
- pf_dynaddr_remove(&pa->addr.addr);
+ if (pf_dynaddr_setup(&pa->addr, pp->af)) {
+ pf_dynaddr_remove(&pa->addr);
pool_put(&pf_pooladdr_pl, pa);
error = EINVAL;
break;
@@ -1716,7 +1716,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
break;
}
bcopy(pa, &pp->addr, sizeof(struct pf_pooladdr));
- pf_dynaddr_copyout(&pp->addr.addr.addr);
+ pf_dynaddr_copyout(&pp->addr.addr);
splx(s);
break;
}
@@ -1730,8 +1730,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
error = EINVAL;
break;
}
- if (pca->addr.addr.addr.type != PF_ADDR_ADDRMASK &&
- pca->addr.addr.addr.type != PF_ADDR_DYNIFTL) {
+ if (pca->addr.addr.type != PF_ADDR_ADDRMASK &&
+ pca->addr.addr.type != PF_ADDR_DYNIFTL) {
error = EINVAL;
break;
}
@@ -1772,8 +1772,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
}
} else
newpa->ifp = NULL;
- if (pf_dynaddr_setup(&newpa->addr.addr, pca->af)) {
- pf_dynaddr_remove(&newpa->addr.addr);
+ if (pf_dynaddr_setup(&newpa->addr, pca->af)) {
+ pf_dynaddr_remove(&newpa->addr);
pool_put(&pf_pooladdr_pl, newpa);
error = EINVAL;
break;
@@ -1803,7 +1803,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
if (pca->action == PF_CHANGE_REMOVE) {
TAILQ_REMOVE(&pool->list, oldpa, entries);
- pf_dynaddr_remove(&oldpa->addr.addr);
+ pf_dynaddr_remove(&oldpa->addr);
pool_put(&pf_pooladdr_pl, oldpa);
} else {
if (oldpa == NULL)
@@ -1817,7 +1817,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p)
}
pool->cur = TAILQ_FIRST(&pool->list);
- PF_ACPY(&pool->counter, &pool->cur->addr.addr.v.a.addr,
+ PF_ACPY(&pool->counter, &pool->cur->addr.v.a.addr,
pca->af);
splx(s);
break;