mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Mesh tweaks (wasnt sending the ip in the + packet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@605 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
f72964d7bf
commit
9e38366b95
@ -36,9 +36,6 @@ class ircd_connector : public classbase
|
||||
*/
|
||||
sockaddr_in addr;
|
||||
|
||||
char host[MAXBUF];
|
||||
int port;
|
||||
|
||||
/** File descriptor of the connection
|
||||
*/
|
||||
int fd;
|
||||
@ -65,6 +62,9 @@ class ircd_connector : public classbase
|
||||
bool SetHostAddress(char* host, int port);
|
||||
|
||||
public:
|
||||
char host[MAXBUF];
|
||||
int port;
|
||||
|
||||
|
||||
bool MakeOutboundConnection(char* host, int port);
|
||||
std::string GetServerName();
|
||||
|
@ -128,11 +128,13 @@ bool ircd_connector::MakeOutboundConnection(char* host, int port)
|
||||
{
|
||||
WriteOpers("Failed to look up hostname for %s, using as an ip address",host);
|
||||
this->SetHostAddress(host,port);
|
||||
SetHostAndPort(host,port);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteOpers("Found hostname for %s",host);
|
||||
this->SetHostAddress(hoste->h_addr,port);
|
||||
SetHostAndPort(hoste->h_addr,port);
|
||||
}
|
||||
|
||||
this->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
@ -192,7 +194,7 @@ bool connection::MeshCookie(char* targethost, int port, long cookie, char* serve
|
||||
|
||||
ircd_connector connector;
|
||||
|
||||
WriteOpers("Establishing meshed link to %s:%d",targethost,port);
|
||||
WriteOpers("Establishing meshed link to %s:%d",servername,port);
|
||||
|
||||
if (this->fd)
|
||||
{
|
||||
|
@ -6629,10 +6629,11 @@ void handle_link_packet(char* udp_msg, char* udp_host, serverrec *serv)
|
||||
if (!strcasecmp(me[j]->connectors[k].GetServerName().c_str(),udp_host))
|
||||
{
|
||||
me[j]->connectors[k].SetServerName(servername);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
WriteOpers("\2WARNING!\2 %s sent us an authentication packet but we are not authenticating with this server right noe! Possible intrusion attempt!",udp_host);
|
||||
WriteOpers("\2WARNING!\2 %s sent us an authentication packet but we are not authenticating with this server right now! Possible intrusion attempt!",udp_host);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user