[PATCH 1/3] gtp: Pass pdp along when calling gtp_req() in gtp_update_context()

Daniel Willmann dwilllmann at sysmocom.de
Wed Feb 3 17:53:29 UTC 2016

From: Daniel Willmann <dwillmann at sysmocom.de>

With no pdp parameter gtp_req() will send the packet to TEID 0 which is
not what we want. When trying to modify an established pdp context the
correct TEID of that context must be used.
 gtp/gtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtp/gtp.c b/gtp/gtp.c
index a3772ff..7cc2328 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -1871,7 +1871,7 @@ int gtp_update_context(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp,
 		gtpie_tlv(&packet, &length, GTP_MAX, GTPIE_OMC_ID,
 			  pdp->omcid.l, pdp->omcid.v);
-	gtp_req(gsn, pdp->version, NULL, &packet, length, inetaddr, cbp);
+	gtp_req(gsn, pdp->version, pdp, &packet, length, inetaddr, cbp);
 	return 0;

More information about the osmocom-net-gprs mailing list