diff options
author | Anders Svensson <[email protected]> | 2015-07-10 16:36:57 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-08-04 18:57:04 +0200 |
commit | f60bc6ad8852e7d97d509ced084c137f55bd4aad (patch) | |
tree | bd0c3ef34944c910a573038ed41fa31728341402 /lib/diameter/src/base | |
parent | 1a90f86927dba2f22cff6e3703c76415da05d667 (diff) | |
download | otp-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')
-rw-r--r-- | lib/diameter/src/base/diameter_peer.erl | 2 |
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); |