diff options
Diffstat (limited to 'accel-pppd/extra/ippool.c')
-rw-r--r-- | accel-pppd/extra/ippool.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c index 442024c..2790183 100644 --- a/accel-pppd/extra/ippool.c +++ b/accel-pppd/extra/ippool.c @@ -285,10 +285,12 @@ 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; + if (it) { + if (ses->ctrl->ppp) + it->it.addr = conf_gw_ip_address; + else + it->it.addr = 0; + } return it ? &it->it : NULL; } |