Bug 324769 - undirected broadcast (255.255.255.255) doesn't work on FreeBSD
Summary: undirected broadcast (255.255.255.255) doesn't work on FreeBSD
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Compiled Sources FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 20:53 UTC by Tim Creech
Modified: 2014-06-26 21:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Creech 2013-09-10 20:53:23 UTC
The bind to 255.255.255.255 fails on FreeBSD. kdeconnect might eventually allow the user to choose an interface, compute its broadcast address, and then do directed broadcasts (e.g., 192.168.0.255) there. Maybe someone knows of a way to convince FreeBSD to do the undirected broadcast with Qt?

Hack/workaround: FreeBSD users can change (hard code) QHostAddress("255.255.255.255") and QHostAddress::Broadcast to QHostAddress("192.168.0.255"), or similar.

Reproducible: Always

Steps to Reproduce:
1) kded4 --nofork

Actual Results:  
Note via debug messages that the FreeBSD desktop never hears any broadcasts


FreeBSD 9.1-RELEASE-p7
Comment 1 Albert Vaca Cintora 2013-09-12 18:27:05 UTC
Well, I have no experience at all on non-linux systems, so I hope another FreeBSD user can helps you. Meanwhile, consider KDE Connect "unsuported" on FreeBSD :(
Comment 2 Raphael Kubo da Costa 2014-06-22 13:49:07 UTC
https://git.reviewboard.kde.org/r/118870/
Comment 3 Raphael Kubo da Costa 2014-06-26 21:22:51 UTC
Git commit 2df8a8064feb15e9570660d0375b58fa084f570d by Raphael Kubo da Costa.
Committed on 22/06/2014 at 11:17.
Pushed by rkcosta into branch 'master'.

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.
REVIEW:	118870

M  +1    -1    core/backends/lan/lanlinkprovider.cpp

http://commits.kde.org/kdeconnect-kde/2df8a8064feb15e9570660d0375b58fa084f570d