diff options
author | Kozlov Dmitry <dima@server> | 2011-08-16 13:22:05 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-08-16 13:22:05 +0400 |
commit | e224721315f555434fee01084b3ed1faa25ca86e (patch) | |
tree | 628daf349efb7029602b8a5f0eb8782729916640 | |
parent | 780b059378b1a20862eb779b74258b023ad02f6b (diff) | |
download | accel-ppp-e224721315f555434fee01084b3ed1faa25ca86e.tar.gz accel-ppp-e224721315f555434fee01084b3ed1faa25ca86e.zip |
chap-secrets: fix incorrect ip address assigning
-rw-r--r-- | accel-pppd/extra/chap-secrets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c index ee83bce..20565b9 100644 --- a/accel-pppd/extra/chap-secrets.c +++ b/accel-pppd/extra/chap-secrets.c @@ -154,11 +154,11 @@ found: } pd->ip.addr = conf_gw_ip_address; - if (n >= 3) + if (n >= 3 && ptr[2][0] != '*') pd->ip.peer_addr = inet_addr(ptr[2]); pd->ip.owner = &ipdb; - if (n == 4) + if (n >= 4) pd->rate = _strdup(ptr[3]); list_add_tail(&pd->pd.entry, &ppp->pd_list); @@ -224,7 +224,7 @@ static struct ipdb_item_t *get_ip(struct ppp_t *ppp) if (!pd) return NULL; - if (!pd->ip.addr) + if (!pd->ip.peer_addr) return NULL; return &pd->ip; |