summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorSimon Leinen <simon.leinen@switch.ch>2009-07-22 12:24:13 +0000
committerkolla <kolla@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2009-07-22 12:24:13 +0000
commitc70699706ed9e28d621676737ee5b83a2b90f528 (patch)
tree74cf428a3f954cb4a9cfe815641e9401a26d2ea8 /radsecproxy.c
parent4bb60779f948ad8f31b343d316bd6c3a78b5075d (diff)
From: Simon Leinen <simon.leinen@switch.ch>
Message-ID: <19015.29517.446579.671665@switch.ch> Subject: SourceUDP and accounting packets git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@503 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index ff2b51f..178d76d 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -132,13 +132,13 @@ int prefixmatch(void *a1, void *a2, uint8_t len) {
}
/* returns next config with matching address, or NULL */
-struct clsrvconf *find_conf(uint8_t type, struct sockaddr *addr, struct list *confs, struct list_node **cur) {
+struct clsrvconf *find_conf(uint8_t type, struct sockaddr *addr, struct list *confs, struct list_node **cur, uint8_t server_p) {
struct list_node *entry;
struct clsrvconf *conf;
for (entry = (cur && *cur ? list_next(*cur) : list_first(confs)); entry; entry = list_next(entry)) {
conf = (struct clsrvconf *)entry->data;
- if (conf->type == type && addressmatches(conf->hostports, addr)) {
+ if (conf->type == type && addressmatches(conf->hostports, addr, server_p)) {
if (cur)
*cur = entry;
return conf;
@@ -148,11 +148,11 @@ struct clsrvconf *find_conf(uint8_t type, struct sockaddr *addr, struct list *co
}
struct clsrvconf *find_clconf(uint8_t type, struct sockaddr *addr, struct list_node **cur) {
- return find_conf(type, addr, clconfs, cur);
+ return find_conf(type, addr, clconfs, cur, 0);
}
struct clsrvconf *find_srvconf(uint8_t type, struct sockaddr *addr, struct list_node **cur) {
- return find_conf(type, addr, srvconfs, cur);
+ return find_conf(type, addr, srvconfs, cur, 1);
}
/* returns next config of given type, or NULL */