From 764449ec2ea6d6b45239278eae90613df8c93f59 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 9 Mar 2021 17:11:45 +0100 Subject: fix/refactor neighbor config The neighbor configuration storage is fundamentally broken: it requires all local cells to be configured before being able to list them as neighbors of each other. Upon config write-back, the neighbor config however is placed back inline with the other config, and hence a written-out neighbor config no longer works on program restart. The cause of this problem is that the config is stored as explicit pointers between local cells (struct gsm_bts), which of course requires the pointer to exist before being able to reference it. Instead, store the actual configuration that the user entered as-is, without pointers or references to objects that need to be ready. Resolve the neighbors every time a neighbor is needed. Hence the user may enter any config at any place in the config file, even non-working config (like a BTS number that doesn't exist), and the relation to actual local or remote neighbor cells is made at runtime. Abort program startup if the initial neighbor configuration contains errors. Related: OS#5018 Change-Id: I9ed992f8bfff888b3933733c0576f92d50f2625b --- src/osmo-bsc/bsc_init.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/osmo-bsc/bsc_init.c') diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c index b959c9f4c..b572f27f0 100644 --- a/src/osmo-bsc/bsc_init.c +++ b/src/osmo-bsc/bsc_init.c @@ -100,7 +100,6 @@ static struct gsm_network *bsc_network_init(void *ctx) net->ho = ho_cfg_init(net, NULL); net->hodec2.congestion_check_interval_s = HO_CFG_CONGESTION_CHECK_DEFAULT; - net->neighbor_bss_cells = neighbor_ident_init(net); /* init statistics */ net->bsc_ctrs = rate_ctr_group_alloc(net, &bsc_ctrg_desc, 0); -- cgit v1.2.3