From 8561941e222cfeef8d99e93782d7f7e146e60932 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 25 Feb 2013 00:26:49 -0500 Subject: Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip --- src/sockets.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/sockets.cpp b/src/sockets.cpp index 1049d0b7f..53ca40f80 100644 --- a/src/sockets.cpp +++ b/src/sockets.cpp @@ -148,6 +148,11 @@ void sockaddrs::pton(int type, const Anope::string &address, int pport) void sockaddrs::ntop(int type, const void *src) { + char buf[INET6_ADDRSTRLEN]; + + if (inet_ntop(type, src, buf, sizeof(buf)) != buf) + throw SocketException("Invalid addr"); + switch (type) { case AF_INET: -- cgit