Skip to content

Commit

Permalink
Implemented changes required by rabbitmq/rabbitmq-server#109. This en…
Browse files Browse the repository at this point in the history
…ables authorization of MQTT/STOMP.
  • Loading branch information
gotthardp committed Apr 16, 2015
1 parent 9884a34 commit 8a356bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# RabbitMQ plug-in for client authorization based on source IP address

## History
* Future 0.2.0 (development version).
Compatible with [RabbitMQ Nightly Builds](http://www.rabbitmq.com/nightlies/rabbitmq-server).
* Implement RabbitMQ [Issue 109](https://github.com/rabbitmq/rabbitmq-server/issues/109)
fix for authorization of MQTT/STOMP connections.
* 0.1.0 (Nov 14, 2014) First release. Compatible with stable RabbitMQ 3.5.x only.

## Configuration

### Install new authorization backend
Expand Down
3 changes: 3 additions & 0 deletions src/rabbit_auth_backend_ip_range.erl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ env(F) ->
V.

extract_address(undefined) -> undefined;
% for native direct connections the address is set to unknown
extract_address(#authz_socket_info{sockname={unknown, _Port}}) -> undefined;
extract_address(#authz_socket_info{sockname={Address, _Port}}) -> Address;
extract_address(Sock) ->
{ok, {Address, _Port}} = rabbit_net:sockname(Sock),
Address.
Expand Down

0 comments on commit 8a356bf

Please sign in to comment.