diff options
author | Harald Welte <laforge@netfilter.org> | 2009-08-07 13:27:09 +0200 |
---|---|---|
committer | Harald Welte <laforge@netfilter.org> | 2009-08-07 13:27:09 +0200 |
commit | 07dc73d4f74a9cb7eddc6259fdb7b095f87e52c1 (patch) | |
tree | c660226d25036f08dc9327ed5cddb46a44079186 /openbsc/src/vty_interface.c | |
parent | fc1c3e58ac7a2179cd32053ed63c4485edf543b6 (diff) |
only allow setting of unit_id on ip.access BTS
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index e1914437a..fa049d6d6 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -772,8 +772,8 @@ DEFUN(cfg_bts_bsic, DEFUN(cfg_bts_unit_id, cfg_bts_unit_id_cmd, - "unit_id <0-65534> <0-255>", - "Set the BTS Unit ID of this BTS\n") + "ip.access unit_id <0-65534> <0-255>", + "Set the ip.access BTS Unit ID of this BTS\n") { struct gsm_bts *bts = vty->index; int site_id = atoi(argv[0]); @@ -789,6 +789,12 @@ DEFUN(cfg_bts_unit_id, bts_id, VTY_NEWLINE); return CMD_WARNING; } + + if (!is_ipaccess_bts(bts)) { + vty_out(vty, "%% BTS is not of ip.access type%s", VTY_NEWLINE); + return CMD_WARNING; + } + bts->ip_access.site_id = site_id; bts->ip_access.bts_id = bts_id; |