summaryrefslogtreecommitdiff
path: root/accel-pptpd
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-10-29 17:30:19 +0400
committerKozlov Dmitry <dima@server>2010-10-29 17:30:19 +0400
commit26f8a6622d8b607bd0edcd769886a2ff37232e6f (patch)
treef998fd9ec95b8307aac1e957bd9a47895e61908c /accel-pptpd
parent321ee9f34c2979fcbca9558cfa601842ff14d13d (diff)
downloadaccel-ppp-26f8a6622d8b607bd0edcd769886a2ff37232e6f.tar.gz
accel-ppp-26f8a6622d8b607bd0edcd769886a2ff37232e6f.zip
ppp: fixed twice ip address configuration
Diffstat (limited to 'accel-pptpd')
-rw-r--r--accel-pptpd/ppp/ipcp_opt_ipaddr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pptpd/ppp/ipcp_opt_ipaddr.c b/accel-pptpd/ppp/ipcp_opt_ipaddr.c
index b0f662e5..d96b6c1a 100644
--- a/accel-pptpd/ppp/ipcp_opt_ipaddr.c
+++ b/accel-pptpd/ppp/ipcp_opt_ipaddr.c
@@ -28,6 +28,7 @@ struct ipaddr_option_t
{
struct ipcp_option_t opt;
struct ipdb_item_t *ip;
+ int started:1;
};
static struct ipcp_option_handler_t ipaddr_opt_hnd=
@@ -119,6 +120,11 @@ static int ipaddr_recv_conf_req(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *o
return IPCP_OPT_NAK;
ack:
+ if (ipaddr_opt->started)
+ return IPCP_OPT_ACK;
+
+ ipaddr_opt->started = 1;
+
ipcp->ppp->ipaddr = ipaddr_opt->ip->addr;
ipcp->ppp->peer_ipaddr = ipaddr_opt->ip->peer_addr;