From ef6d78ff7f96ce898e976f1c2bc638ff5d2d29fb Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 17 Jul 2018 15:56:53 +0200 Subject: sgsn: Fix crash using new libgtp cb_recovery2 API When PDP CTX CREATE ACK is received with an increased RestartCtr, cb_recovery2 is called first, which will dettach ggsn from al pdp ctx (free the pdp_t). But when giving control back from the ctrl, libgtp still uses that freed ctx and sends it back to osmo-sgsn through cb_conf(). As specs state in any case that we need to handle the message containing the increased RestartCtr as valid, we then need to avoid freeing the pdp ctx and leave handling for later in cb_conf. Depends: osmo-ggsn (libgtp) Change-Id I53e92298f2f6b84d662a3300d922e8c2ccb178bc. Change-Id: I0989c00e18ca95a099e1a312940eaac71957b444 --- include/osmocom/sgsn/gprs_sgsn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 8eba2d410..6f16dc75f 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -362,7 +362,7 @@ struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id); struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct in_addr *addr); struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(uint32_t id); void sgsn_ggsn_ctx_drop_pdp(struct sgsn_pdp_ctx *pctx); -int sgsn_ggsn_ctx_drop_all_pdp(struct sgsn_ggsn_ctx *ggsn); +int sgsn_ggsn_ctx_drop_all_pdp_except(struct sgsn_ggsn_ctx *ggsn, struct sgsn_pdp_ctx *except); void sgsn_ggsn_ctx_add_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp); void sgsn_ggsn_ctx_remove_pdp(struct sgsn_ggsn_ctx *ggc, struct sgsn_pdp_ctx *pdp); -- cgit v1.2.3