summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-08-05 17:57:59 +0000
committerpjd <pjd@FreeBSD.org>2010-08-05 17:57:59 +0000
commitd222eba6ffb610e95edc83dbfbd3f356888d08d9 (patch)
tree5b712e5b98ece925c33ce1003ac5d56dc1bcd6aa /sbin
parentd808f64f394be4d3083d37ff9be20e7e083b35c2 (diff)
downloadFreeBSD-src-d222eba6ffb610e95edc83dbfbd3f356888d08d9.zip
FreeBSD-src-d222eba6ffb610e95edc83dbfbd3f356888d08d9.tar.gz
Now that TCP will be checked last we don't need any knowledge about other
protocols. MFC after: 1 month
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/proto_tcp4.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sbin/hastd/proto_tcp4.c b/sbin/hastd/proto_tcp4.c
index 09e9e65..6fe1471 100644
--- a/sbin/hastd/proto_tcp4.c
+++ b/sbin/hastd/proto_tcp4.c
@@ -126,11 +126,12 @@ tcp4_addr(const char *addr, struct sockaddr_in *sinp)
addr += 7;
else if (strncasecmp(addr, "tcp://", 6) == 0)
addr += 6;
- else if (addr[0] != '/' && /* If this is not path... */
- strstr(addr, "://") == NULL)/* ...and has no prefix... */
- ; /* ...tcp4 is the default. */
- else
- return (-1);
+ else {
+ /*
+ * Because TCP4 is the default assume IP or host is given without
+ * prefix.
+ */
+ }
sinp->sin_family = AF_INET;
sinp->sin_len = sizeof(*sinp);
OpenPOWER on IntegriCloud