From 67ac2ba78573644d6649921bafc41ba098061e0a Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 11 Oct 2013 16:53:14 +0400 Subject: 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 --- accel-pppd/extra/chap-secrets.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'accel-pppd/extra/chap-secrets.c') diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c index 94e441de..d2d752a2 100644 --- a/accel-pppd/extra/chap-secrets.c +++ b/accel-pppd/extra/chap-secrets.c @@ -287,7 +287,7 @@ static struct ipv4db_item_t *get_ip(struct ap_session *ses) { struct cs_pd_t *pd; - if (!conf_gw_ip_address) + if (!conf_gw_ip_address && ses->ctrl->ppp) return NULL; pd = find_pd(ses); @@ -298,6 +298,9 @@ static struct ipv4db_item_t *get_ip(struct ap_session *ses) if (!pd->ip.peer_addr) return NULL; + if (!ses->ctrl->ppp) + pd->ip.addr = 0; + return &pd->ip; } -- cgit v1.2.3