diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-03-14 16:59:30 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-03-14 16:59:30 +0400 |
commit | d77729c3d6d4e646e0eb629a81faca90d61eea0c (patch) | |
tree | 742e0103bb1a2441819ed9e37908e88d05aa8eb3 /accel-pppd/ppp/ppp.c | |
parent | 144650e729bb733393f2cc32f99569ce5dc068b8 (diff) | |
download | accel-ppp-d77729c3d6d4e646e0eb629a81faca90d61eea0c.tar.gz accel-ppp-d77729c3d6d4e646e0eb629a81faca90d61eea0c.zip |
ppp: move ip address release to proper place
Diffstat (limited to 'accel-pppd/ppp/ppp.c')
-rw-r--r-- | accel-pppd/ppp/ppp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index 3ab71662..178f33c4 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -18,6 +18,7 @@ #include "events.h" #include "ppp.h" #include "ppp_fsm.h" +#include "ipdb.h" #include "log.h" #include "spinlock.h" #include "mempool.h" @@ -255,6 +256,16 @@ static void destablish_ppp(struct ppp_t *ppp) ppp->ipv6_pool_name = NULL; } + if (ppp->ipv4) { + ipdb_put_ipv4(ppp, ppp->ipv4); + ppp->ipv4 = NULL; + } + + if (ppp->ipv6) { + ipdb_put_ipv6(ppp, ppp->ipv6); + ppp->ipv6 = NULL; + } + if (ppp_shutdown && !ppp_stat.starting && !ppp_stat.active && !ppp_stat.finishing) kill(getpid(), SIGTERM); } |