std::string IP = Conf.ReadValue("bind","address",j);
if (Type == "servers")
{
- if ((IP != "*") && (IP != "127.0.0.1") && (IP != ""))
+ if ((IP != "*") && (IP != "127.0.0.1") && (IP != "") && (IP != "::1"))
{
insp_sockaddr s;
void InspSocket::Close()
{
+ /* Save this, so we dont lose it,
+ * otherise on failure, error messages
+ * might be inaccurate.
+ */
+ int save = errno;
if (this->fd > -1)
{
if (this->IsIOHooked && Instance->Config->GetIOHook(this))
shutdown(this->fd,2);
close(this->fd);
}
+ errno = save;
}
std::string InspSocket::GetIP()