[lac] The lac must be 16 bit. Change it in gsm_bts and vty parsing
The LAC can be 16bit of size. the generation of the LAI, struct
gsm_subsriber and the BSC<->MSC was already using it as a
16bit (short) value.
Change struct gsm_bts to parse 16bit and change the vty configuration
parsing code to deal with a short too.
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index b6a9dea..79124d9 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -861,14 +861,14 @@
DEFUN(cfg_bts_lac,
cfg_bts_lac_cmd,
- "location_area_code <0-255>",
+ "location_area_code <0-65535>",
"Set the Location Area Code (LAC) of this BTS\n")
{
struct gsm_bts *bts = vty->index;
int lac = atoi(argv[0]);
- if (lac < 0 || lac > 0xff) {
- vty_out(vty, "%% LAC %d is not in the valid range (0-255)%s",
+ if (lac < 0 || lac > 0xffff) {
+ vty_out(vty, "%% LAC %d is not in the valid range (0-65535)%s",
lac, VTY_NEWLINE);
return CMD_WARNING;
}