aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_peer.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-07-10 16:36:57 +0200
committerAnders Svensson <[email protected]>2015-08-04 18:57:04 +0200
commitf60bc6ad8852e7d97d509ced084c137f55bd4aad (patch)
treebd0c3ef34944c910a573038ed41fa31728341402 /lib/diameter/src/base/diameter_peer.erl
parent1a90f86927dba2f22cff6e3703c76415da05d667 (diff)
downloadotp-f60bc6ad8852e7d97d509ced084c137f55bd4aad.tar.gz
otp-f60bc6ad8852e7d97d509ced084c137f55bd4aad.tar.bz2
otp-f60bc6ad8852e7d97d509ced084c137f55bd4aad.zip
Match allowable peer addresses case insensitively
Both diameter_tcp and diameter_sctp can be configured with one or more IP addresses from which connections should be accepted (an 'accept' tuple), specified either as a tuple-valued address or as a regular expression. In the latter case, peer addresses are mapped to string using inet:ntoa/1 and the result matched against the regexp. Since (ipv6) addresses are case insensitive, this should also be the case with the match, but was not.
Diffstat (limited to 'lib/diameter/src/base/diameter_peer.erl')
-rw-r--r--lib/diameter/src/base/diameter_peer.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_peer.erl b/lib/diameter/src/base/diameter_peer.erl
index 95c0c65029..96b6d404e0 100644
--- a/lib/diameter/src/base/diameter_peer.erl
+++ b/lib/diameter/src/base/diameter_peer.erl
@@ -201,7 +201,7 @@ match1(Addr, Match) ->
match(Addr, {ok, A}, _) ->
Addr == A;
match(Addr, {error, _}, RE) ->
- match == re:run(inet:ntoa(Addr), RE, [{capture, none}]).
+ match == re:run(inet:ntoa(Addr), RE, [{capture, none}, caseless]).
addr([_|_] = A) ->
inet:parse_address(A);