summaryrefslogtreecommitdiff
path: root/src/tools/irm
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-08-10 13:03:33 +0200
committerdimitri staessens <[email protected]>2016-08-10 13:03:33 +0200
commit9740c4bf2966d57d6f7e0d034a862211cb3814c4 (patch)
tree9b33b5d1888cd4fb338b57b7b1aa90349668eb8b /src/tools/irm
parentaca897331ff55c80d926b0bdb90f1c8962bf7a6e (diff)
parente5cb8042c9f0c6374c4f14bf7ff3f4fe3cdcd155 (diff)
downloadouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.tar.gz
ouroboros-9740c4bf2966d57d6f7e0d034a862211cb3814c4.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-bugfixing
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;
}