diff options
author | Jon Schipp <jonschipp@gmail.com> | 2014-07-24 18:01:43 +0000 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-07-25 08:21:58 +0200 |
commit | 2de653340c789c2ef4b442b146c3f3e53e306c31 (patch) | |
tree | 4a080d8db93f368acaa0360422df92873da6d3cf /staging/cli.c | |
parent | 52463b7934760b1afabd6523913a48ba2a7c51ee (diff) |
mausezahn: bind to IP address in interactive mode
Adds new option ``-l'' that can be used to set mausezahn's
listen address to bind to an IP of choice. e.g.
mausezahn -l 127.0.0.1 -x
Signed-off-by: Jon Schipp <jonschipp@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'staging/cli.c')
-rw-r--r-- | staging/cli.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/staging/cli.c b/staging/cli.c index ad040a1..7d8e2ce 100644 --- a/staging/cli.c +++ b/staging/cli.c @@ -532,7 +532,7 @@ int cli() // Listen on port mz_port (default: 25542, towel day) memset(&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; - servaddr.sin_addr.s_addr = htonl(INADDR_ANY); // TODO: specified interface + inet_aton(mz_listen_addr, &servaddr.sin_addr); servaddr.sin_port = htons(mz_port); bind(s, (struct sockaddr *)&servaddr, sizeof(servaddr)); |