summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/irm')
-rw-r--r--src/tools/irm/irm_ipcp_bootstrap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c
index d5fa97da..34c5d223 100644
--- a/src/tools/irm/irm_ipcp_bootstrap.c
+++ b/src/tools/irm/irm_ipcp_bootstrap.c
@@ -184,12 +184,17 @@ int do_bootstrap_ipcp(int argc, char ** argv)
}
len = irm_list_ipcps(name, &apis);
- if (len <= 0)
- return -1;
+ if (len <= 0) {
+ if (!irm_create_ipcp(name, conf.type))
+ return -1;
+ len = irm_list_ipcps(name, &apis);
+ }
for (i = 0; i < len; i++)
if (irm_bootstrap_ipcp(apis[i], &conf))
return -1;
+ free(apis);
+
return 0;
}