summaryrefslogtreecommitdiff
path: root/src/network.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-12-09 21:26:48 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-12-09 21:26:48 +0100
commit1cef5fc2744d2428f28976c7adb0f476d8bc3bcf (patch)
tree89633b5f3778865e0f9348d37442f63ccec11811 /src/network.h
parentd9ddd8746ca83f361ec7ffb9f7146f6a23553b93 (diff)
Network: ignore packets sent by ourselves
Diffstat (limited to 'src/network.h')
-rw-r--r--src/network.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network.h b/src/network.h
index b1ecf86..a59a1bc 100644
--- a/src/network.h
+++ b/src/network.h
@@ -147,6 +147,7 @@ struct Server::Priv
void doListen();
void doAnnounce();
+ bool isSelfAddress(const sockaddr_in & paddr);
Peer & getPeer(const sockaddr_in & paddr);
void handlePacket(Peer &, const TransportHeader &, ReplyBuilder &);
@@ -173,6 +174,7 @@ struct Server::Priv
vector<weak_ptr<WaitingRef>> waiting;
int sock;
+ vector<in_addr> localAddresses;
vector<in_addr> bcastAddresses;
// Start destruction with finalizing services