diff options
author | Adam <Adam@anope.org> | 2013-02-25 00:26:49 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-25 00:26:49 -0500 |
commit | 8561941e222cfeef8d99e93782d7f7e146e60932 (patch) | |
tree | 3491edebd08d77ff8a62459704f8a03a7b9721e9 /src/sockets.cpp | |
parent | 5d4db2b85408202086ae35f38306e81f9216959e (diff) |
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
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r-- | src/sockets.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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: |