mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
Ignore Zeroconf messages sent by ourselves
This commit is contained in:
parent
248a87ccce
commit
14af3aedd6
@ -29,6 +29,7 @@
|
||||
#include <QList>
|
||||
#include <QHostAddress>
|
||||
#include <QHostInfo>
|
||||
#include <QNetworkInterface>
|
||||
#include <QNetworkProxy>
|
||||
#include <QUdpSocket>
|
||||
#include <QTimer>
|
||||
@ -131,6 +132,10 @@ private slots:
|
||||
m_sock.readDatagram( datagram.data(), datagram.size(), &sender, &senderPort );
|
||||
qDebug() << "DATAGRAM RCVD" << QString::fromLatin1( datagram ) << sender;
|
||||
|
||||
// Ignore our own requests
|
||||
if ( QNetworkInterface::allAddresses().contains( sender ) )
|
||||
return;
|
||||
|
||||
// only process msgs originating on the LAN:
|
||||
if ( datagram.startsWith( "TOMAHAWKADVERT:" ) &&
|
||||
Servent::isIPWhitelisted( sender ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user