From 81546f327061085c5a59c4c6f40924fa9993ff4a Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 2 Nov 2010 14:04:10 +0100 Subject: =?UTF-8?q?Fix=20crash=20in=20ejabberd=5Fc2s=20when=20blacklist=20?= =?UTF-8?q?hook=20returned=20true=20(thanks=20to=20Jonas=20=C3=85dahl)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cause of the crash jlib:ip_to_list/1 only supports IP tuples using the form {N1,N2,N3,N4} which is not the case when IPv6 is enabled. --- src/ejabberd_c2s.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ejabberd_c2s.erl') diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 40c5a515f..975f79423 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -243,8 +243,8 @@ init([{SockMod, Socket}, Opts, FSMLimitOpts]) -> %% Check if IP is blacklisted: case is_ip_blacklisted(IP) of true -> - ?INFO_MSG("Connection attempt from blacklisted IP: ~s", - [jlib:ip_to_list(IP)]), + ?INFO_MSG("Connection attempt from blacklisted IP: ~s (~w)", + [jlib:ip_to_list(IP), IP]), {stop, normal}; false -> Socket1 = -- cgit v1.2.3