From 00f0606c3b4e74e768ab250bf04572afe178b4f6 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 26 Oct 2016 16:59:04 +0200 Subject: 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. --- src/tools/irm/irm_ipcp_bootstrap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tools/irm/irm_ipcp_bootstrap.c') diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c index cc1bf6f9..7d72eb15 100644 --- a/src/tools/irm/irm_ipcp_bootstrap.c +++ b/src/tools/irm/irm_ipcp_bootstrap.c @@ -78,6 +78,7 @@ static void usage(void) int do_bootstrap_ipcp(int argc, char ** argv) { char * name = NULL; + pid_t api; struct dif_config conf; uint8_t addr_size = DEFAULT_ADDR_SIZE; uint8_t cep_id_size = DEFAULT_CEP_ID_SIZE; @@ -186,8 +187,11 @@ int do_bootstrap_ipcp(int argc, char ** argv) len = irm_list_ipcps(name, &apis); if (len <= 0) { - if (!irm_create_ipcp(name, conf.type)) + api = irm_create_ipcp(name, conf.type); + if (api == 0) return -1; + if (conf.type == IPCP_NORMAL) + irm_bind_api(api, name); len = irm_list_ipcps(name, &apis); } -- cgit v1.2.3