summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 10:24:34 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-27 10:40:45 +0200
commit643931db3d235005d8e1fb818275cc322c002692 (patch)
tree5aa1df76f84a4371c0682dc0649f0ddce8bf397b
parent1400310f05dd83413fd3a7b9ec27f0c5ee1e0a92 (diff)
nat: Look at the number type to figure out if we want to rewrite it
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index abcb2717d..b345a77f5 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -773,7 +773,9 @@ struct msgb *bsc_nat_rewrite_setup(struct bsc_nat *nat, struct msgb *msg, struct
TLVP_VAL(&tp, GSM48_IE_CALLED_BCD) - 1);
/* check if it looks international and stop */
- if (strncmp(called.number, "+", 1) == 0)
+ if (called.plan != 1)
+ return msg;
+ if (called.type == 1)
return msg;
if (strncmp(called.number, "00", 2) == 0)
return msg;