aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-01 13:35:03 +0800
committerHarald Welte <laforge@gnumonks.org>2017-10-01 18:19:07 +0800
commitdd266066c7cc96c797034da352cc9d72177c5780 (patch)
tree6ffb55ef9db02cae268b52d8fba6cdbfc9cb7681
parentb5624c3d4838cd774c3a6df4208b709890174a25 (diff)
apn_start(): fix clean-up after errors bringing up APN
When there's an interim error (e.g. in resolving the link-local address or setting up the tun device), apn_start() simply calls apn_stop() on the not-yet-fully-started apn_ctx. This only works if apn_stop() doesn't bail out early in case of a not-started apn_ctx, so let's remove the related check at the start of the function. Change-Id: I2917a6258cb73cc12fd9d81296ff0eaa616890b9
-rw-r--r--ggsn/ggsn.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 462b395..c1f0c1a 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -112,9 +112,6 @@ static void pool_close_all_pdp(struct ippool_t *pool)
int apn_stop(struct apn_ctx *apn, bool force)
{
- if (!apn->started)
- return 0;
-
LOGPAPN(LOGL_NOTICE, apn, "%sStopping\n", force ? "FORCED " : "");
/* check if pools have any active PDP contexts and bail out */
pool_close_all_pdp(apn->v4.pool);