diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-18 12:45:08 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-18 12:45:08 +0200 |
commit | d764c064bbafab8268795ee8a9ab0649d4879910 (patch) | |
tree | 6e6a7bc7e364ba2a13373fb8f4ba041fb9ffc6f4 /openbsc/src/gprs | |
parent | 6ffbaab90d13063f887baff196246594ba89ac5c (diff) |
[GPRS] LLC: Fix logic to detect unknown TLLI/SAPI
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gprs_llc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 484a16878..ee65a9177 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -513,14 +513,16 @@ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv) /* 7.2.1.1 LLC belonging to unassigned TLLI+SAPI shall be discarded, * except UID and XID frames with SAPI=1 */ - if (!lle && llhp.sapi == GPRS_SAPI_GMM && - (llhp.cmd == GPRS_LLC_XID || llhp.cmd == GPRS_LLC_UI)) { - /* FIXME: don't use the TLLI but the 0xFFFF unassigned? */ - lle = lle_alloc(msgb_tlli(msg), llhp.sapi); - } else { - LOGP(DLLC, LOGL_NOTICE, - "unknown TLLI/SAPI: Silently dropping\n"); - return 0; + if (!lle) { + if (llhp.sapi == GPRS_SAPI_GMM && + (llhp.cmd == GPRS_LLC_XID || llhp.cmd == GPRS_LLC_UI)) { + /* FIXME: don't use the TLLI but the 0xFFFF unassigned? */ + lle = lle_alloc(msgb_tlli(msg), llhp.sapi); + } else { + LOGP(DLLC, LOGL_NOTICE, + "unknown TLLI/SAPI: Silently dropping\n"); + return 0; + } } /* Update LLE's (BVCI, NSEI) tuple */ |