diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-05-03 08:00:55 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2011-05-03 08:00:55 +0000 |
commit | 220301f368ae22f37fb3e949a5da1331f8c63372 (patch) | |
tree | 82ab747368ab2e5a0c34d39a89153eb879aa0d57 | |
parent | b390a0870d68a4915f148287ebbfd493d445a155 (diff) |
If the string of the address to listen on is '-' then listen on all
addresses (ie pass NULL to getaddrinfo which would return 0.0.0.0
and :: in most cases)
-rw-r--r-- | usr.bin/aucat/aucat.1 | 9 | ||||
-rw-r--r-- | usr.bin/aucat/listen.c | 4 | ||||
-rw-r--r-- | usr.bin/aucat/midicat.1 | 9 |
3 files changed, 16 insertions, 6 deletions
diff --git a/usr.bin/aucat/aucat.1 b/usr.bin/aucat/aucat.1 index 5e4678a246f..fff3236a07e 100644 --- a/usr.bin/aucat/aucat.1 +++ b/usr.bin/aucat/aucat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: aucat.1,v 1.77 2011/04/28 07:28:18 jmc Exp $ +.\" $OpenBSD: aucat.1,v 1.78 2011/05/03 08:00:54 ratchov Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 28 2011 $ +.Dd $Mdocdate: May 3 2011 $ .Dt AUCAT 1 .Os .Sh NAME @@ -152,6 +152,11 @@ Without this option, listens on the .Ux Ns -domain socket only, and is not reachable from any network. +If the option argument is +.Sq - +then +.Nm +will accept connections from any address. .It Fl l Detach and become a daemon. .It Fl m Ar mode diff --git a/usr.bin/aucat/listen.c b/usr.bin/aucat/listen.c index df6e1eb412f..f151d0169a2 100644 --- a/usr.bin/aucat/listen.c +++ b/usr.bin/aucat/listen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: listen.c,v 1.15 2011/05/02 22:24:23 ratchov Exp $ */ +/* $OpenBSD: listen.c,v 1.16 2011/05/03 08:00:54 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -107,7 +107,7 @@ listen_new_tcp(char *addr, unsigned port) */ memset(&aihints, 0, sizeof(struct addrinfo)); snprintf(serv, sizeof(serv), "%u", port); - host = strcmp(addr, "*") == 0 ? NULL : addr; + host = strcmp(addr, "-") == 0 ? NULL : addr; aihints.ai_flags |= AI_PASSIVE; aihints.ai_socktype = SOCK_STREAM; aihints.ai_protocol = IPPROTO_TCP; diff --git a/usr.bin/aucat/midicat.1 b/usr.bin/aucat/midicat.1 index 5f335bb5466..eaeb0fef740 100644 --- a/usr.bin/aucat/midicat.1 +++ b/usr.bin/aucat/midicat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: midicat.1,v 1.15 2011/04/28 06:19:57 ratchov Exp $ +.\" $OpenBSD: midicat.1,v 1.16 2011/05/03 08:00:54 ratchov Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov <alex@caoua.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 28 2011 $ +.Dd $Mdocdate: May 3 2011 $ .Dt MIDICAT 1 .Os .Sh NAME @@ -69,6 +69,11 @@ Without this option, listens on the .Ux Ns -domain socket only, and is not reachable from any network. +If the option argument is +.Sq - +then +.Nm +will accept connections from any address. .It Fl l Detach and become a daemon. .It Fl o Ar file |