aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-30 11:53:18 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-30 11:53:18 +0200
commit290aaed6e4818f9552382e996e0806b93c8100f3 (patch)
treea4b78238dd39ccb1bd1e7dfdea8030b2e5253da3 /openbsc
parent9fbff4adacd9b7b4c45482c2b7c8ecf900d76ba7 (diff)
[BSC] use correct 0x2B padding for user-specified SI
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/bsc_vty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 739fd8c57..586301596 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -1922,6 +1922,10 @@ DEFUN(cfg_bts_si_static, cfg_bts_si_static_cmd,
return CMD_WARNING;
}
+ /* Fill buffer with padding pattern */
+ memset(bts->si_buf[type], 0x2b, sizeof(bts->si_buf[type]));
+
+ /* Parse the user-specified SI in hex format, [partially] overwriting padding */
rc = hexparse(argv[1], bts->si_buf[type], sizeof(bts->si_buf[0]));
if (rc < 0 || rc > sizeof(bts->si_buf[0])) {
vty_out(vty, "Error parsing HEXSTRING%s", VTY_NEWLINE);