diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-27 10:24:12 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-27 10:40:44 +0200 |
commit | 1400310f05dd83413fd3a7b9ec27f0c5ee1e0a92 (patch) | |
tree | eededc08422e3d3306d3f1928286164967c2fb5d | |
parent | 25adfceb3a40661d8a0842ade18439bf622c3987 (diff) |
nat: Explain that we do not want to have a + in the replacement rule
-rw-r--r-- | openbsc/src/nat/bsc_nat_utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c index e1f1ddcfe..abcb2717d 100644 --- a/openbsc/src/nat/bsc_nat_utils.c +++ b/openbsc/src/nat/bsc_nat_utils.c @@ -788,6 +788,12 @@ struct msgb *bsc_nat_rewrite_setup(struct bsc_nat *nat, struct msgb *msg, struct if (entry->mnc[0] == '*' || strncmp(entry->mnc, imsi + 3, 2) != 0) continue; + if (entry->text[0] == '+') { + LOGP(DNAT, LOGL_ERROR, + "Plus is not allowed in the number"); + continue; + } + /* We have an entry for the IMSI. Need to match now */ if (regcomp(®, entry->option, REG_EXTENDED) != 0) { LOGP(DNAT, LOGL_ERROR, |