diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-08-30 21:04:19 +0200 |
---|---|---|
committer | laforge <laforge@gnumonks.org> | 2019-09-02 09:03:43 +0000 |
commit | 68c5a745570fa097406a574550dc393be01cf56b (patch) | |
tree | 01ee3d2c42cf0533debb8f067ce4dbd577b8e4c4 | |
parent | bdf2cf9038e9e96c1952d9557bce8c58a4d5d624 (diff) |
gtp/gtp.c: cosmetic: use get_tid() where we need TID
Change-Id: I39e92f25ed51665c8a615826ed52f35024bdd54b
-rw-r--r-- | gtp/gtp.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1423,11 +1423,8 @@ int gtp_create_pdp_ind(struct gsn_t *gsn, int version, pdp = &pdp_buf; memset(pdp, 0, sizeof(struct pdp_t)); - if (version == 0) { - uint64_t tid = be64toh(((union gtp_packet *)pack)->gtp0.h.tid); - - pdp_set_imsi_nsapi(pdp, tid); - } + if (version == 0) + pdp_set_imsi_nsapi(pdp, get_tid(pack)); pdp->seq = seq; pdp->sa_peer = *peer; @@ -2712,7 +2709,7 @@ static int gtp_error_ind_conf(struct gsn_t *gsn, uint8_t version, /* Find the context in question */ if (version == 0) { - if (gtp_pdp_tidget(gsn, &pdp, be64toh(((union gtp_packet *)pack)->gtp0.h.tid))) { + if (gtp_pdp_tidget(gsn, &pdp, get_tid(pack))) { gsn->err_unknownpdp++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n"); |