Fix potential segfault in sgsn_libgtp.c
* print pdp->address instead of mm->imsi if mm is NULL * print mm->imsi in debug log (move it below NULL check) Change-Id: I4fbf5a54019a46612fbc528d61120182738f9205
This commit is contained in:
parent
d3270a9c05
commit
0436e42472
|
@ -641,8 +641,6 @@ static int cb_data_ind(struct pdp_t *lib, void *packet, unsigned int len)
|
||||||
struct msgb *msg;
|
struct msgb *msg;
|
||||||
uint8_t *ud;
|
uint8_t *ud;
|
||||||
|
|
||||||
DEBUGP(DGPRS, "GTP DATA IND from GGSN, length=%u\n", len);
|
|
||||||
|
|
||||||
pdp = lib->priv;
|
pdp = lib->priv;
|
||||||
if (!pdp) {
|
if (!pdp) {
|
||||||
LOGP(DGPRS, LOGL_NOTICE,
|
LOGP(DGPRS, LOGL_NOTICE,
|
||||||
|
@ -652,10 +650,14 @@ static int cb_data_ind(struct pdp_t *lib, void *packet, unsigned int len)
|
||||||
mm = pdp->mm;
|
mm = pdp->mm;
|
||||||
if (!mm) {
|
if (!mm) {
|
||||||
LOGP(DGPRS, LOGL_ERROR,
|
LOGP(DGPRS, LOGL_ERROR,
|
||||||
"PDP context (imsi=%s) without MM context!\n", mm->imsi);
|
"PDP context (address=%u) without MM context!\n",
|
||||||
|
pdp->address);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUGP(DGPRS, "GTP DATA IND from GGSN for %s, length=%u\n", mm->imsi,
|
||||||
|
len);
|
||||||
|
|
||||||
if (mm->ran_type == MM_CTX_T_UTRAN_Iu) {
|
if (mm->ran_type == MM_CTX_T_UTRAN_Iu) {
|
||||||
#ifdef BUILD_IU
|
#ifdef BUILD_IU
|
||||||
/* Ignore the packet for now and page the UE to get the RAB
|
/* Ignore the packet for now and page the UE to get the RAB
|
||||||
|
|
Loading…
Reference in New Issue