diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-06 15:11:34 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-06 15:12:25 +0200 |
commit | 86f42eb6a5091805e5569edeed1f32b97124f720 (patch) | |
tree | 817ec02afc7043755543faceee923bfdcd53300e /openbsc/src/nat/bsc_nat_utils.c | |
parent | 494c086dca1fbfcfeaf0d2dbde4fd6f85e6552a8 (diff) |
nat: Store the config in the connection instead of the lac
This allows that we can print the Nr. next to the lac
and it allows us to change the lac at runtime without
reconnecting the BSC.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_utils.c')
-rw-r--r-- | openbsc/src/nat/bsc_nat_utils.c | 4 |
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 8c6de31fe..24b4e1f00 100644 --- a/openbsc/src/nat/bsc_nat_utils.c +++ b/openbsc/src/nat/bsc_nat_utils.c @@ -115,7 +115,9 @@ struct bsc_connection *bsc_nat_find_bsc(struct bsc_nat *nat, struct msgb *msg) for (i = 1; i < data_length - 1; i += 2) { unsigned int _lac = ntohs(*(unsigned int *) &data[i]); llist_for_each_entry(bsc, &nat->bsc_connections, list_entry) { - if (!bsc->authenticated || _lac != bsc->lac) + if (!bsc->cfg) + continue; + if (!bsc->authenticated || _lac != bsc->cfg->lac) continue; return bsc; |