This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/14297 ) Change subject: gtp: Make use of new libgtp APIs with multi-gsn support ...................................................................... gtp: Make use of new libgtp APIs with multi-gsn support Drop use of deprecated APIs everywhere in libgtp and use the new ones instead. Related: OS#2873 Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa --- M gtp/gtp.c 1 file changed, 22 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/gtp/gtp.c b/gtp/gtp.c index 84b8844..94c3245 100644 --- a/gtp/gtp.c +++ b/gtp/gtp.c @@ -156,9 +156,8 @@ for (n = 0; n < PDP_MAXNSAPI; n++) { if (pdp->secondary_tei[n]) { - if (pdp_getgtp1 - (&secondary_pdp, - pdp->secondary_tei[n])) { + if (gtp_pdp_getgtp1(gsn, &secondary_pdp, + pdp->secondary_tei[n])) { LOGP(DLGTP, LOGL_ERROR, "Unknown secondary PDP context\n"); continue; @@ -1150,7 +1149,7 @@ Protocol Configuration Options */ if (pdp->secondary) { - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -1430,7 +1429,7 @@ if (!gtpie_gettv1(ie, GTPIE_NSAPI, 1, &linked_nsapi)) { /* Find the primary PDP context */ - if (pdp_getgtp1(&linked_pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, get_tei(pack))) { gsn->incorrect++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, @@ -1613,9 +1612,9 @@ in_addr2gsna(&pdp->gsnlc, &gsn->gsnc); in_addr2gsna(&pdp->gsnlu, &gsn->gsnu); - DEBUGP(DLGTP, "gtp_create_pdp_ind: Before pdp_tidget\n"); + DEBUGP(DLGTP, "gtp_create_pdp_ind: Before gtp_pdp_tidget\n"); - if (!pdp_getimsi(&pdp_old, pdp->imsi, pdp->nsapi)) { + if (!gtp_pdp_getimsi(gsn, &pdp_old, pdp->imsi, pdp->nsapi)) { /* Found old pdp with same tid. Now the voodoo begins! */ /* 09.60 / 29.060 allows create on existing context to "steal" */ /* the context which was allready established */ @@ -1709,7 +1708,7 @@ return EOF; /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2091,7 +2090,7 @@ pdp_set_imsi_nsapi(pdp, tid); /* Find the context in question */ - if (pdp_getimsi(&pdp, imsi, nsapi)) { + if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2113,7 +2112,7 @@ /* IMSI (conditional) */ if (gtpie_gettv0(ie, GTPIE_IMSI, 0, &imsi, sizeof(imsi))) { /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", @@ -2124,7 +2123,7 @@ } } else { /* Find the context in question */ - if (pdp_getimsi(&pdp, imsi, nsapi)) { + if (gtp_pdp_getimsi(gsn, &pdp, imsi, nsapi)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2290,7 +2289,7 @@ return EOF; /* Find the context in question */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2391,7 +2390,7 @@ { struct pdp_t *linked_pdp; - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -2447,7 +2446,7 @@ return EOF; } - if (pdp_getgtp1(&linked_pdp, pdp->teic_own)) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, pdp->teic_own)) { LOGP(DLGTP, LOGL_ERROR, "Unknown linked PDP context: %u\n", pdp->teic_own); return EOF; @@ -2543,7 +2542,7 @@ } /* Find the linked context in question */ - if (pdp_getgtp1(&linked_pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &linked_pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context: %u\n", get_tei(pack)); @@ -2583,7 +2582,7 @@ } /* Find the context in question */ - if (pdp_getgtp1(&pdp, linked_pdp->secondary_tei[nsapi & 0x0f])) { + if (gtp_pdp_getgtp1(gsn, &pdp, linked_pdp->secondary_tei[nsapi & 0x0f])) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2636,7 +2635,7 @@ /* Find the context in question. It may not be available if gtp_delete_context_req * was used and as a result the PDP ctx was already freed */ - if (pdp_getgtp1(&pdp, get_tei(pack))) { + if (gtp_pdp_getgtp1(gsn, &pdp, get_tei(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_NOTICE, peer, pack, len, "Unknown PDP context: %u (expected if gtp_delete_context_req is used or pdp ctx was freed manually before response)\n", @@ -2714,7 +2713,7 @@ /* Find the context in question */ if (version == 0) { - if (pdp_tidget(&pdp, be64toh(((union gtp_packet *)pack)->gtp0.h.tid))) { + if (gtp_pdp_tidget(gsn, &pdp, be64toh(((union gtp_packet *)pack)->gtp0.h.tid))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); @@ -2740,7 +2739,7 @@ return EOF; } - if (pdp_getgtp1_peer_d(&pdp, peer, teid_gn)) { + if (gtp_pdp_getgtp1_peer_d(gsn, &pdp, peer, teid_gn)) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); return EOF; @@ -2770,8 +2769,8 @@ switch (version) { case 0: - if (pdp_getgtp0 - (&pdp, ntoh16(((union gtp_packet *)pack)->gtp0.h.flow))) { + if (gtp_pdp_getgtp0(gsn, &pdp, + ntoh16(((union gtp_packet *)pack)->gtp0.h.flow))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context, GTPv0\n"); @@ -2781,8 +2780,8 @@ hlen = GTP0_HEADER_SIZE; break; case 1: - if (pdp_getgtp1 - (&pdp, ntoh32(((union gtp_packet *)pack)->gtp1l.h.tei))) { + if (gtp_pdp_getgtp1(gsn, &pdp, + ntoh32(((union gtp_packet *)pack)->gtp1l.h.tei))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context, GTPv1\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/14297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: Ibf56a063f01d1f95a2a3271416da6e062e85fdfa Gerrit-Change-Number: 14297 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190604/cc7c5b0d/attachment.htm>