cbc_main: Fix setting default SBc-AP local address

The issue was not spotted until now because until recently
cbc_vty_go_parent was not called due to another bug.

Change-Id: I697597438d8c45f5956b12e2a6ea76413e945e5e
This commit is contained in:
Pau Espin 2022-07-22 14:15:26 +02:00
parent 54f50a4857
commit b05a9a6615
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ static int cbc_vty_go_parent(struct vty *vty)
switch (vty->node) {
case SBcAP_NODE:
/* If no local addr set, add a default one: */
if (g_cbc->config.sbcap.num_local_host) {
if (g_cbc->config.sbcap.num_local_host == 0) {
g_cbc->config.sbcap.local_host[0] = talloc_strdup(g_cbc, "127.0.0.1");
g_cbc->config.sbcap.num_local_host = 1;
}