aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-01-10 14:33:27 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-01-10 14:33:27 +0100
commit8c36fdb1d8938b7e453d626e363ee225a2845c4e (patch)
tree338dc51527b6ddbc61ec4056b4531dfa9991a990
parent55466197f03c7f9f5bb2de8366db887be3b02023 (diff)
nat: Fix comment and mask for looking at TP-MTI
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
index 1fd226ff9..bf1417d94 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
@@ -1075,10 +1075,11 @@ static struct msgb *rewrite_sms(struct bsc_nat *nat, struct msgb *msg,
return NULL;
}
- /* look into the phone number */
- if ((data_ptr[0] & 0x01) != 1)
+ /* TP-PDU starts here */
+ if ((data_ptr[0] & 0x03) != GSM340_SMS_SUBMIT_MS2SC)
return NULL;
+ /* look into the phone number */
dest_len = data_ptr[2];
if (data_len < dest_len + 3 || dest_len < 2) {
LOGP(DNAT, LOGL_ERROR, "SMS-SUBMIT can not have TP-DestAddr.\n");