Bug 324769

Summary: undirected broadcast (255.255.255.255) doesn't work on FreeBSD
Product: [Applications] kdeconnect Reporter: Tim Creech <dezgotspam>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: normal CC: arthur, rakuco
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: FreeBSD   
Latest Commit: Version Fixed In:

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