summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/ippool.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2013-10-11 16:53:14 +0400
committerDmitry Kozlov <xeb@mail.ru>2013-10-11 16:53:22 +0400
commit67ac2ba78573644d6649921bafc41ba098061e0a (patch)
treef00d5c088656ff89fbccb82df59f5eba935782a4 /accel-pppd/extra/ippool.c
parent8c608ea9a5b6b73520c11e3974bb8cad3b7da914 (diff)
downloadaccel-ppp-67ac2ba78573644d6649921bafc41ba098061e0a.tar.gz
accel-ppp-67ac2ba78573644d6649921bafc41ba098061e0a.zip
radius,ippool,chap-secrets: do not assign local address if session is not ppp
Do not assign local address for non-PPP (IPoE at present) sessions in specified modules. This enforces ctrl to assign proper local address by itself. Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/extra/ippool.c')
-rw-r--r--accel-pppd/extra/ippool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 8dbf0272..442024c6 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -285,6 +285,11 @@ static struct ipv4db_item_t *get_ip(struct ap_session *ses)
it = NULL;
spin_unlock(&p->lock);
+ if (ses->ctrl->ppp)
+ it->it.addr = conf_gw_ip_address;
+ else
+ it->it.addr = 0;
+
return it ? &it->it : NULL;
}