summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/chap-secrets.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/extra/chap-secrets.c')
-rw-r--r--accel-pppd/extra/chap-secrets.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c
index 94e441d..d2d752a 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;
}