Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2df8a806 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa

LanLinkProvider: Bind the UDP server socket to Any, not Broadcast.

Trying to bind a UDP socket to 255.255.255.255 fails with EADDRNOTAVAIL
at least on FreeBSD.

The sender side on Android should send its message in broadcast mode (as
it already does), but the receiver side should bind to INADDR_ANY, not
INADDR_BROADCAST.

BUG:	324769
REVIEW:	118870
parent 5a91db44
......@@ -68,7 +68,7 @@ LanLinkProvider::LanLinkProvider()
void LanLinkProvider::onStart()
{
bool buildSucceed = mUdpServer->bind(QHostAddress::Broadcast, port, QUdpSocket::ShareAddress);
bool buildSucceed = mUdpServer->bind(QHostAddress::Any, port, QUdpSocket::ShareAddress);
Q_ASSERT(buildSucceed);
mTcpPort = port;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment