Harald 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
- (_pdp,
-pdp->secondary_tei[n])) {
+ if (gtp_pdp_getgtp1(gsn, _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(_pdp, pdp->teic_own)) {
+ if (gtp_pdp_getgtp1(gsn, _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, _nsapi)) {
/* Find the primary PDP context */
- if (pdp_getgtp1(_pdp, get_tei(pack))) {
+ if (gtp_pdp_getgtp1(gsn, _pdp, get_tei(pack))) {
gsn->incorrect++;
GTP_LOGPKG(LOGL_ERROR, peer,
pack, len,
@@ -1613,9 +1612,9 @@
in_addr2gsna(>gsnlc, >gsnc);
in_addr2gsna(>gsnlu, >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(_old, pdp->imsi, pdp->nsapi)) {
+ if (!gtp_pdp_getimsi(gsn, _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(, get_tei(pack))) {
+ if (gtp_pdp_getgtp1(gsn, , 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(, imsi, nsapi)) {
+ if (gtp_pdp_getimsi(gsn, , 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, , sizeof(imsi))) {
/* Find the context in question */
- if (pdp_getgtp1(, get_tei(pack))) {
+ if (gtp_pdp_getgtp1(gsn, , 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(, imsi, nsapi)) {
+ if (gtp_pdp_getimsi(gsn, , 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(, get_tei(pack))) {
+ if (gtp_pdp_getgtp1(gsn, , 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(_pdp, pdp->teic_own)) {
+ if (gtp_pdp_getgtp1(gsn, _pdp, pdp->teic_own)) {
LOGP(DLGTP, LOGL_ERROR,
"Unknown