summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/ippool.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-06-19 19:06:06 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-06-19 19:06:06 +0400
commit02b3fb2b24aacd90d535c2136a055f529d722974 (patch)
tree6243dd815869add07be2bad5846e7817b732ac59 /accel-pppd/extra/ippool.c
parentc553a7bbbc96d36ba4d0999bb172c7a926518eb1 (diff)
downloadaccel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.tar.gz
accel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.zip
general preparation for IPoE integration
Diffstat (limited to 'accel-pppd/extra/ippool.c')
-rw-r--r--accel-pppd/extra/ippool.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index fc4fd18..ab2dfb2 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -205,13 +205,13 @@ static void generate_pool(struct ippool_t *p)
}
}
-static struct ipv4db_item_t *get_ip(struct ppp_t *ppp)
+static struct ipv4db_item_t *get_ip(struct ap_session *ses)
{
struct ippool_item_t *it;
struct ippool_t *p;
- if (ppp->ipv4_pool_name)
- p = find_pool(ppp->ipv4_pool_name, 0);
+ if (ses->ipv4_pool_name)
+ p = find_pool(ses->ipv4_pool_name, 0);
else
p = def_pool;
@@ -229,7 +229,7 @@ static struct ipv4db_item_t *get_ip(struct ppp_t *ppp)
return it ? &it->it : NULL;
}
-static void put_ip(struct ppp_t *ppp, struct ipv4db_item_t *it)
+static void put_ip(struct ap_session *ses, struct ipv4db_item_t *it)
{
struct ippool_item_t *pit = container_of(it, typeof(*pit), it);
@@ -244,12 +244,12 @@ static struct ipdb_t ipdb = {
};
#ifdef RADIUS
-static int parse_attr(struct ppp_t *ppp, struct rad_attr_t *attr)
+static int parse_attr(struct ap_session *ses, struct rad_attr_t *attr)
{
if (attr->len > sizeof("ip:addr-pool=") && memcmp(attr->val.string, "ip:addr-pool=", sizeof("ip:addr-pool=") - 1) == 0)
- ppp->ipv4_pool_name = _strdup(attr->val.string + sizeof("ip:addr-pool=") - 1);
+ ses->ipv4_pool_name = _strdup(attr->val.string + sizeof("ip:addr-pool=") - 1);
else if (!attr->vendor)
- ppp->ipv4_pool_name = _strdup(attr->val.string);
+ ses->ipv4_pool_name = _strdup(attr->val.string);
else
return -1;
@@ -269,7 +269,7 @@ static void ev_radius_access_accept(struct ev_radius_t *ev)
continue;
if (attr->attr->id != conf_attr)
continue;
- if (parse_attr(ev->ppp, attr))
+ if (parse_attr(ev->ses, attr))
continue;
break;
}