diff options
author | Ulf Wiger <ulf@feuerlabs.com> | 2015-12-22 14:43:27 -0800 |
---|---|---|
committer | Ulf Wiger <ulf@feuerlabs.com> | 2016-01-12 08:18:17 -0800 |
commit | 7922125aba23033945e3b55a4bf78ef8e84521d0 (patch) | |
tree | 2d9d41249aa12072aeebe15ad08148185b7da5a2 /components | |
parent | d69fcf58db0daa09fcf6ac826c139e35711cecd0 (diff) | |
download | rvi_core-7922125aba23033945e3b55a4bf78ef8e84521d0.tar.gz |
selects wrong remote addr
Diffstat (limited to 'components')
-rw-r--r-- | components/authorize/src/authorize_keys.erl | 3 | ||||
-rw-r--r-- | components/dlink_tcp/src/dlink_tcp_rpc.erl | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/components/authorize/src/authorize_keys.erl b/components/authorize/src/authorize_keys.erl index 31dc1ca..593f69c 100644 --- a/components/authorize/src/authorize_keys.erl +++ b/components/authorize/src/authorize_keys.erl @@ -273,7 +273,8 @@ to_bin(B) when is_binary(B) -> B; to_bin(L) when is_list(L) -> iolist_to_binary(L); to_bin(I) when is_integer(I) -> integer_to_binary(I). -filter_by_service_(Services, Conn) -> +filter_by_service_(Services, Conn0) -> + Conn = normalize_conn(Conn0), ?debug("Filter: creds = ~p", [[{K,abbrev_payload(V)} || {K,V} <- ets:tab2list(?CREDS)]]), Invoke = ets:select(?CREDS, [{ {{Conn,'_'}, #cred{right_to_invoke = '$1', _ = '_'}}, diff --git a/components/dlink_tcp/src/dlink_tcp_rpc.erl b/components/dlink_tcp/src/dlink_tcp_rpc.erl index fc907d6..330985a 100644 --- a/components/dlink_tcp/src/dlink_tcp_rpc.erl +++ b/components/dlink_tcp/src/dlink_tcp_rpc.erl @@ -667,7 +667,7 @@ process_authorize(FromPid, PeerIP, PeerPort, RemoteAddress, ?debug("dlink_tcp:authorize(): Credentials: ~p", [ [authorize_keys:abbrev_bin(C) || C <- Credentials] ]), {NRemoteAddress, NRemotePort} = Conn = case { RemoteAddress, RemotePort } of - { "0.0.0.0", 0 } -> + { <<"0.0.0.0">>, 0 } -> ?info("dlink_tcp:authorize(): Remote is behind firewall. Will use ~p:~p", [ PeerIP, PeerPort]), |