summaryrefslogtreecommitdiff
path: root/sys/net/pf_lb.c
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2018-12-10 16:48:16 +0000
committerkn <kn@cvs.openbsd.org>2018-12-10 16:48:16 +0000
commit8f7d43d902801bc373bd61161c92c6a50e2c1e30 (patch)
tree6e1d97882e5bf21b45c6b90aea4bcb96f1f4be5a /sys/net/pf_lb.c
parent6254ab4e5b46b478602584aefefc3538956b8844 (diff)
Remove useless macros
These are just unhelpful case conversion. OK sashan henning
Diffstat (limited to 'sys/net/pf_lb.c')
-rw-r--r--sys/net/pf_lb.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 5936531c8c2..174d5a721b7 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.62 2018/02/06 09:16:11 henning Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.63 2018/12/10 16:48:15 kn Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -181,8 +181,8 @@ pf_get_sport(struct pf_pdesc *pd, struct pf_rule *r,
key.af = pd->naf;
key.proto = pd->proto;
key.rdomain = pd->rdomain;
- PF_ACPY(&key.addr[didx], &pd->ndaddr, key.af);
- PF_ACPY(&key.addr[sidx], naddr, key.af);
+ pf_addrcpy(&key.addr[didx], &pd->ndaddr, key.af);
+ pf_addrcpy(&key.addr[sidx], naddr, key.af);
key.port[didx] = pd->ndport;
/*
@@ -274,7 +274,7 @@ pf_map_addr_sticky(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
k.af = af;
k.type = type;
- PF_ACPY(&k.addr, saddr, af);
+ pf_addrcpy(&k.addr, saddr, af);
k.rule.ptr = r;
pf_status.scounters[SCNT_SRC_NODE_SEARCH]++;
sns[type] = RB_FIND(pf_src_tree, &tree_src_tracking, &k);
@@ -320,7 +320,7 @@ pf_map_addr_sticky(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
return (-1);
}
if (!PF_AZERO(cached, af))
- PF_ACPY(naddr, cached, af);
+ pf_addrcpy(naddr, cached, af);
if (pf_status.debug >= LOG_DEBUG) {
log(LOG_DEBUG, "pf: pf_map_addr: "
"src tracking (%u) maps ", type);
@@ -386,10 +386,10 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
switch (rpool->opts & PF_POOL_TYPEMASK) {
case PF_POOL_NONE:
- PF_ACPY(naddr, raddr, af);
+ pf_addrcpy(naddr, raddr, af);
break;
case PF_POOL_BITMASK:
- PF_POOLMASK(naddr, raddr, rmask, saddr, af);
+ pf_poolmask(naddr, raddr, rmask, saddr, af);
break;
case PF_POOL_RANDOM:
if (rpool->addr.type == PF_ADDR_TABLE) {
@@ -401,7 +401,7 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
memset(&rpool->counter, 0, sizeof(rpool->counter));
if (pfr_pool_get(rpool, &raddr, &rmask, af))
return (1);
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
} else if (rpool->addr.type == PF_ADDR_DYNIFTL) {
cnt = rpool->addr.p.dyn->pfid_kt->pfrkt_cnt;
if (cnt == 0)
@@ -411,7 +411,7 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
memset(&rpool->counter, 0, sizeof(rpool->counter));
if (pfr_pool_get(rpool, &raddr, &rmask, af))
return (1);
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
} else if (init_addr != NULL && PF_AZERO(init_addr, af)) {
switch (af) {
case AF_INET:
@@ -438,12 +438,12 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
default:
unhandled_af(af);
}
- PF_POOLMASK(naddr, raddr, rmask, &rpool->counter, af);
- PF_ACPY(init_addr, naddr, af);
+ pf_poolmask(naddr, raddr, rmask, &rpool->counter, af);
+ pf_addrcpy(init_addr, naddr, af);
} else {
- PF_AINC(&rpool->counter, af);
- PF_POOLMASK(naddr, raddr, rmask, &rpool->counter, af);
+ pf_addr_inc(&rpool->counter, af);
+ pf_poolmask(naddr, raddr, rmask, &rpool->counter, af);
}
break;
case PF_POOL_SRCHASH:
@@ -458,7 +458,7 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
memset(&rpool->counter, 0, sizeof(rpool->counter));
if (pfr_pool_get(rpool, &raddr, &rmask, af))
return (1);
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
} else if (rpool->addr.type == PF_ADDR_DYNIFTL) {
cnt = rpool->addr.p.dyn->pfid_kt->pfrkt_cnt;
if (cnt == 0)
@@ -468,9 +468,9 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
memset(&rpool->counter, 0, sizeof(rpool->counter));
if (pfr_pool_get(rpool, &raddr, &rmask, af))
return (1);
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
} else {
- PF_POOLMASK(naddr, raddr, rmask,
+ pf_poolmask(naddr, raddr, rmask,
(struct pf_addr *)&hash, af);
}
break;
@@ -508,16 +508,16 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
}
if (rpool->weight >= rpool->curweight)
break;
- PF_AINC(&rpool->counter, af);
+ pf_addr_inc(&rpool->counter, af);
} while (1);
weight = rpool->weight;
}
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
if (init_addr != NULL && PF_AZERO(init_addr, af))
- PF_ACPY(init_addr, naddr, af);
- PF_AINC(&rpool->counter, af);
+ pf_addrcpy(init_addr, naddr, af);
+ pf_addr_inc(&rpool->counter, af);
break;
case PF_POOL_LEASTSTATES:
/* retrieve an address first */
@@ -544,18 +544,18 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
else
load = states;
- PF_ACPY(&faddr, &rpool->counter, af);
+ pf_addrcpy(&faddr, &rpool->counter, af);
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
if (init_addr != NULL && PF_AZERO(init_addr, af))
- PF_ACPY(init_addr, naddr, af);
+ pf_addrcpy(init_addr, naddr, af);
/*
* iterate *once* over whole table and find destination with
* least connection
*/
do {
- PF_AINC(&rpool->counter, af);
+ pf_addr_inc(&rpool->counter, af);
if (rpool->addr.type == PF_ADDR_TABLE ||
rpool->addr.type == PF_ADDR_DYNIFTL) {
if (pfr_pool_get(rpool, &raddr, &rmask, af))
@@ -579,10 +579,10 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
weight = rpool->weight;
load = cload;
- PF_ACPY(naddr, &rpool->counter, af);
+ pf_addrcpy(naddr, &rpool->counter, af);
if (init_addr != NULL &&
PF_AZERO(init_addr, af))
- PF_ACPY(init_addr, naddr, af);
+ pf_addrcpy(init_addr, naddr, af);
}
} while (pf_match_addr(1, &faddr, rmask, &rpool->counter, af) &&
(states > 0));
@@ -665,7 +665,7 @@ pf_get_transaddr(struct pf_rule *r, struct pf_pdesc *pd,
return (-1);
}
*nr = r;
- PF_ACPY(&pd->nsaddr, &naddr, pd->af);
+ pf_addrcpy(&pd->nsaddr, &naddr, pd->af);
pd->nsport = nport;
}
if (r->rdr.addr.type != PF_ADDR_NONE) {
@@ -673,7 +673,7 @@ pf_get_transaddr(struct pf_rule *r, struct pf_pdesc *pd,
&r->rdr, PF_SN_RDR))
return (-1);
if ((r->rdr.opts & PF_POOL_TYPEMASK) == PF_POOL_BITMASK)
- PF_POOLMASK(&naddr, &naddr, &r->rdr.addr.v.a.mask,
+ pf_poolmask(&naddr, &naddr, &r->rdr.addr.v.a.mask,
&pd->ndaddr, pd->af);
nport = 0;
@@ -693,7 +693,7 @@ pf_get_transaddr(struct pf_rule *r, struct pf_pdesc *pd,
} else if (r->rdr.proxy_port[0])
nport = htons(r->rdr.proxy_port[0]);
*nr = r;
- PF_ACPY(&pd->ndaddr, &naddr, pd->af);
+ pf_addrcpy(&pd->ndaddr, &naddr, pd->af);
if (nport)
pd->ndport = nport;
}
@@ -815,8 +815,8 @@ pf_get_transaddr_af(struct pf_rule *r, struct pf_pdesc *pd,
}
}
- PF_ACPY(&pd->nsaddr, &nsaddr, pd->naf);
- PF_ACPY(&pd->ndaddr, &ndaddr, pd->naf);
+ pf_addrcpy(&pd->nsaddr, &nsaddr, pd->naf);
+ pf_addrcpy(&pd->ndaddr, &ndaddr, pd->naf);
if (pf_status.debug >= LOG_INFO) {
log(LOG_INFO, "pf: af-to %s %s done, prefixlen %d, ",