[BSC] use correct 0x2B padding for user-specified SI

This commit is contained in:
Harald Welte 2010-07-30 11:53:18 +02:00
parent 9fbff4adac
commit 290aaed6e4
1 changed files with 4 additions and 0 deletions

View File

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