sccp: ensure addressbook entry names are unique
It is possible to add two (or more) different sccp-addresses under the same name, when the addresses are defined in different cs7 instances. Add a check to make sure an address name is not used multiple times Change-Id: I63227cd87bc24f7d9ac995430b869f0393818335
This commit is contained in:
parent
dcb360a9db
commit
b06c887cf0
|
@ -1205,6 +1205,16 @@ DEFUN(cs7_sccpaddr, cs7_sccpaddr_cmd,
|
|||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
/* Ensure that we do not use address names that
|
||||
* are already used in other ss7 instances. */
|
||||
entry = addr_entry_by_name_global(name);
|
||||
if (entry != NULL) {
|
||||
vty_out(vty,
|
||||
"address name (%s) already used in ss7 instance %u%s",
|
||||
entry->name, entry->inst->cfg.id, VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
entry = addr_entry_by_name_local(name, inst);
|
||||
|
||||
/* Create a new addressbook entry if we can not find an
|
||||
|
|
Loading…
Reference in New Issue