diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-10-26 16:59:04 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-10-26 16:59:04 +0200 |
commit | 00f0606c3b4e74e768ab250bf04572afe178b4f6 (patch) | |
tree | 8685e2455ca514484735314c343b2c55511a3d1c /src/tools/irm/irm_ipcp_enroll.c | |
parent | f60e18adc78afaf4d07a10e6fe8aec3767e0ca11 (diff) | |
download | ouroboros-00f0606c3b4e74e768ab250bf04572afe178b4f6.tar.gz ouroboros-00f0606c3b4e74e768ab250bf04572afe178b4f6.zip |
tools: irm: Bind IPCP name to IPCP-I
This will invoke the bind operation when using the irm tool to create
a new IPCP. The new IPCP will be bound to the IPCP name as specified
by the administrator.
Diffstat (limited to 'src/tools/irm/irm_ipcp_enroll.c')
-rw-r--r-- | src/tools/irm/irm_ipcp_enroll.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c index b5517bcd..911a81a1 100644 --- a/src/tools/irm/irm_ipcp_enroll.c +++ b/src/tools/irm/irm_ipcp_enroll.c @@ -40,6 +40,7 @@ int do_enroll_ipcp(int argc, char ** argv) char * name = NULL; char * dif_name = NULL; pid_t * apis = NULL; + pid_t api; ssize_t len = 0; int i = 0; @@ -65,8 +66,10 @@ int do_enroll_ipcp(int argc, char ** argv) len = irm_list_ipcps(name, &apis); if (len <= 0) { - if (!irm_create_ipcp(name, IPCP_NORMAL)) + api = irm_create_ipcp(name, IPCP_NORMAL); + if (api == 0) return -1; + irm_bind_api(api, name); len = irm_list_ipcps(name, &apis); } |