mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:24:36 +02:00
only process new domain list if it comes from current DS
This commit is contained in:
parent
33ddda2558
commit
081a44dbff
1 changed files with 8 additions and 1 deletions
|
@ -112,7 +112,14 @@ void NodeList::timePingReply(sockaddr *nodeAddress, unsigned char *packetData) {
|
||||||
void NodeList::processNodeData(sockaddr* senderAddress, unsigned char* packetData, size_t dataBytes) {
|
void NodeList::processNodeData(sockaddr* senderAddress, unsigned char* packetData, size_t dataBytes) {
|
||||||
switch (packetData[0]) {
|
switch (packetData[0]) {
|
||||||
case PACKET_TYPE_DOMAIN: {
|
case PACKET_TYPE_DOMAIN: {
|
||||||
processDomainServerList(packetData, dataBytes);
|
// only process the DS if this is our current domain server
|
||||||
|
sockaddr_in domainServerSocket = *(sockaddr_in*) senderAddress;
|
||||||
|
const char* domainSenderIP = inet_ntoa(domainServerSocket.sin_addr);
|
||||||
|
|
||||||
|
if (memcmp(domainSenderIP, _domainIP, strlen(domainSenderIP)) == 0) {
|
||||||
|
processDomainServerList(packetData, dataBytes);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PACKET_TYPE_PING: {
|
case PACKET_TYPE_PING: {
|
||||||
|
|
Loading…
Reference in a new issue