aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-02 18:58:10 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-02 19:31:13 +0800
commitd1287e379b284f5b27baa1edb185e0b74a221a7d (patch)
tree43a732993d70c279eed4c4f03244aa4f614a078b
parent3fb44f3e61551add4ba1b1344b9e08c8799e0039 (diff)
nat: Do not allow a BSC to send auth messages twice.
-rw-r--r--openbsc/src/nat/bsc_nat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 1cca8bac..d9cf5e54 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -477,6 +477,12 @@ static void ipaccess_auth_bsc(struct tlv_parsed *tvp, struct bsc_connection *bsc
struct bsc_config *conf;
const char* token = (const char *) TLVP_VAL(tvp, IPAC_IDTAG_UNITNAME);
+ if (bsc->cfg) {
+ LOGP(DNAT, LOGL_ERROR, "Reauth on fd %d bsc nr %d\n",
+ bsc->write_queue.bfd.fd, bsc->cfg->nr);
+ return;
+ }
+
llist_for_each_entry(conf, &bsc->nat->bsc_configs, entry) {
if (strcmp(conf->token, token) == 0) {
counter_inc(conf->stats.net.reconn);