projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix binding of the cli to the configured address
[l2tpns.git]
/
cli.c
diff --git
a/cli.c
b/cli.c
index
32c82a9
..
25ba34f
100644
(file)
--- a/
cli.c
+++ b/
cli.c
@@
-139,8
+139,6
@@
void init_cli()
char buf[4096];
struct cli_command *c;
struct cli_command *c2;
char buf[4096];
struct cli_command *c;
struct cli_command *c2;
- int on = 1;
- struct sockaddr_in addr;
cli = cli_init();
cli = cli_init();
@@
-268,6
+266,17
@@
void init_cli()
}
fclose(f);
}
}
fclose(f);
}
+}
+
+void cli_init_complete(char *hostname)
+{
+ int on = 1;
+ struct sockaddr_in addr;
+
+ if (hostname && *hostname)
+ cli_set_hostname(cli, hostname);
+ else
+ cli_set_hostname(cli, "l2tpns");
memset(&addr, 0, sizeof(addr));
clifd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
memset(&addr, 0, sizeof(addr));
clifd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
@@
-297,14
+306,6
@@
void init_cli()
}
}
}
}
-void cli_init_hostname(char *hostname)
-{
- if (hostname && *hostname)
- cli_set_hostname(cli, hostname);
- else
- cli_set_hostname(cli, "l2tpns");
-}
-
void cli_do(int sockfd)
{
int require_auth = 1;
void cli_do(int sockfd)
{
int require_auth = 1;