summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r--accel-pppd/ppp/ipcp_opt_ipaddr.c3
-rw-r--r--accel-pppd/ppp/ipv6cp_opt_intfid.c3
-rw-r--r--accel-pppd/ppp/ppp.c11
3 files changed, 6 insertions, 11 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c
index a05dd995..14557440 100644
--- a/accel-pppd/ppp/ipcp_opt_ipaddr.c
+++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c
@@ -58,6 +58,9 @@ static void ipaddr_free(struct ppp_ipcp_t *ipcp, struct ipcp_option_t *opt)
{
struct ipaddr_option_t *ipaddr_opt = container_of(opt, typeof(*ipaddr_opt), opt);
+ if (ipcp->ppp->ipv4)
+ ipdb_put_ipv4(ipcp->ppp, ipcp->ppp->ipv4);
+
_free(ipaddr_opt);
}
diff --git a/accel-pppd/ppp/ipv6cp_opt_intfid.c b/accel-pppd/ppp/ipv6cp_opt_intfid.c
index 3215efc7..0d3d7513 100644
--- a/accel-pppd/ppp/ipv6cp_opt_intfid.c
+++ b/accel-pppd/ppp/ipv6cp_opt_intfid.c
@@ -79,6 +79,9 @@ static void ipaddr_free(struct ppp_ipv6cp_t *ipv6cp, struct ipv6cp_option_t *opt
{
struct ipaddr_option_t *ipaddr_opt=container_of(opt,typeof(*ipaddr_opt),opt);
+ if (ipv6cp->ppp->ipv6)
+ ipdb_put_ipv6(ipv6cp->ppp, ipv6cp->ppp->ipv6);
+
_free(ipaddr_opt);
}
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index 178f33c4..3ab71662 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -18,7 +18,6 @@
#include "events.h"
#include "ppp.h"
#include "ppp_fsm.h"
-#include "ipdb.h"
#include "log.h"
#include "spinlock.h"
#include "mempool.h"
@@ -256,16 +255,6 @@ 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);
}