nat: Do not allow a BSC to send auth messages twice.

This commit is contained in:
Holger Hans Peter Freyther 2010-05-02 18:58:10 +08:00
parent 3b8798184b
commit 5cdcfa6224
1 changed files with 6 additions and 0 deletions

View File

@ -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);