[170] Fix WS listeners not being able to bind to an IP.
Closes #170. Thanks to minghuadev. Bug: https://github.com/eclipse/mosquitto/issues/170
This commit is contained in:
parent
afc2c9951c
commit
7761218d3c
@ -16,6 +16,8 @@ Broker:
|
||||
- Fix reconnecting for bridges that use TLS on Windows. Closes #154.
|
||||
- Broker and bridges can now cope with unknown incoming PUBACK, PUBREC,
|
||||
PUBREL, PUBCOMP without disconnecting. Closes #57.
|
||||
- Fix websockets listeners not being able to bind to an IP address. Closes
|
||||
#170.
|
||||
|
||||
Client library:
|
||||
- Fix the case where a message received just before the keepalive timer
|
||||
|
@ -629,17 +629,23 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>listener</option> <replaceable>port</replaceable></term>
|
||||
<term><option>listener</option> <replaceable>port</replaceable> <replaceable><optional>bind address/host</optional></replaceable></term>
|
||||
<listitem>
|
||||
<para>Listen for incoming network connection on the
|
||||
specified port. A second optional argument allows
|
||||
the listener to be bound to a specific ip
|
||||
address/hostname. If this variable is used and
|
||||
neither <option>bind_address</option> nor
|
||||
<option>port</option> are used then the default
|
||||
listener will not be started. This option may be
|
||||
specified multiple times. See also the
|
||||
<option>mount_point</option> option.</para>
|
||||
neither the global <option>bind_address</option>
|
||||
nor <option>port</option> options are used then the
|
||||
default listener will not be started.</para>
|
||||
<para>The <option>bind address/host</option> option
|
||||
allows this listener to be bound to a specific IP
|
||||
address by passing an IP address or hostname. For
|
||||
websockets listeners, it is only possible to pass
|
||||
an IP address here.</para>
|
||||
<para>This option may be specified multiple times. See
|
||||
also the <option>mount_point</option>
|
||||
option.</para>
|
||||
<para>Not reloaded on reload signal.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -271,6 +271,8 @@
|
||||
# this case, mosquitto will attempt to bind the listener to that
|
||||
# address and so restrict access to the associated network and
|
||||
# interface. By default, mosquitto will listen on all interfaces.
|
||||
# Note that for a websockets listener it is not possible to bind to a host
|
||||
# name.
|
||||
# listener port-number [ip address/host name]
|
||||
#listener
|
||||
|
||||
|
@ -584,6 +584,7 @@ struct libwebsocket_context *mosq_websockets_init(struct _mqtt3_listener *listen
|
||||
}
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.iface = listener->host;
|
||||
info.port = listener->port;
|
||||
info.protocols = p;
|
||||
info.gid = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user