summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_bootstrap.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-08-10 12:31:14 +0200
committerdimitri staessens <[email protected]>2016-08-10 12:31:14 +0200
commit0ec8f7b6d977a9cc469445d4990d432253f979d9 (patch)
tree33ca5c8a7a237952b8c037596ecdd874b518a6fb /src/tools/irm/irm_ipcp_bootstrap.c
parent31b2edb845628e1d6b1b5b17821b060c152679af (diff)
parent6e854784ebc67af1eb8cdc3209f574e0af5e574d (diff)
downloadouroboros-0ec8f7b6d977a9cc469445d4990d432253f979d9.tar.gz
ouroboros-0ec8f7b6d977a9cc469445d4990d432253f979d9.zip
Merged in sandervrijders/ouroboros/be-bootstrap (pull request #199)
Several small fixes and enhancements
Diffstat (limited to 'src/tools/irm/irm_ipcp_bootstrap.c')
-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;
}