aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-05-10 05:22:50 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-05-14 11:52:56 +0000
commit78faf70fef23993e7b6d07247c917c5cc720a97d (patch)
tree6973e7b429ac86a3d05b589614033a0fde407ee8
parenta70084b035fb0e5541da12397bc7a10932e8b1cd (diff)
deprecate dyn_ts_allow_tch_f and by default allow all TCH
In osmo-nitb, the way TCH lchans were assigned often resulted in mismatching TCH kinds, causing problems in the lack of transcoding. Hence dyn_ts_allow_tch_f was introduced as a workaround. Now however, we always assign an SDCCH to a requesting MS first, and only later assign a TCH channel, which then adheres to the codec list configured at 'msc' in the vty config. Hence it is now considerably harder to obtain a mismatch. Furthermore, forcing specific codecs is possible by simply omitting the unwanted ones from the msc config's codec-list. The equivalent of 'dyn_ts_allow_tch_f 0' could be e.g. 'codec-list hr3 hr2 hr1'. Change-Id: Ib2335d02ea545aff837aadd49f15b2fdb418c46e
-rw-r--r--src/libbsc/bsc_vty.c8
-rw-r--r--src/libbsc/net_init.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 1efca0c88..ea4c8d046 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1001,8 +1001,8 @@ static int config_write_net(struct vty *vty)
VTY_OUT_TIMER(3119);
VTY_OUT_TIMER(3122);
VTY_OUT_TIMER(3141);
- vty_out(vty, " dyn_ts_allow_tch_f %d%s",
- gsmnet->dyn_ts_allow_tch_f ? 1 : 0, VTY_NEWLINE);
+ if (!gsmnet->dyn_ts_allow_tch_f)
+ vty_out(vty, " dyn_ts_allow_tch_f 0%s", VTY_NEWLINE);
if (gsmnet->tz.override != 0) {
if (gsmnet->tz.dst)
vty_out(vty, " timezone %d %d %d%s",
@@ -4615,7 +4615,7 @@ DEFUN(cfg_net_encryption,
return CMD_SUCCESS;
}
-DEFUN(cfg_net_dyn_ts_allow_tch_f,
+DEFUN_DEPRECATED(cfg_net_dyn_ts_allow_tch_f,
cfg_net_dyn_ts_allow_tch_f_cmd,
"dyn_ts_allow_tch_f (0|1)",
"Allow or disallow allocating TCH/F on TCH_F_TCH_H_PDCH timeslots\n"
@@ -4624,6 +4624,8 @@ DEFUN(cfg_net_dyn_ts_allow_tch_f,
{
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
gsmnet->dyn_ts_allow_tch_f = atoi(argv[0]) ? true : false;
+ vty_out(vty, "%% dyn_ts_allow_tch_f is deprecated, rather use msc/codec-list to pick codecs%s",
+ VTY_NEWLINE);
return CMD_SUCCESS;
}
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index d5ea5b275..f03a2e12f 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -52,6 +52,8 @@ struct gsm_network *bsc_network_init(void *ctx)
.mnc = 1,
};
+ net->dyn_ts_allow_tch_f = true;
+
/* Permit a compile-time default of A5/3 and A5/1 */
net->a5_encryption_mask = (1 << 3) | (1 << 1);