Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000847Zandronum[All Projects] Bugpublic2012-05-13 13:122018-09-30 19:53
ReporterKoromix 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSArch LinuxOS Version
Product Version98d 
Target VersionFixed in Version1.0 
Summary0000847: Broadcast permission denied
DescriptionHere is what I'm getting with the latest Skulltag version when starting skulltag-server on Arch Linux (kernel 3.3.5, glibc 2.15) :

*** MAP01: entryway ***

compatflags changed to: 0
NETWORK_LaunchPacket: Permission denied
NETWORK_LaunchPacket: Address 192.168.1.255:15101
NETWORK_LaunchPacket: Permission denied
NETWORK_LaunchPacket: Address 192.168.1.255:15101
NETWORK_LaunchPacket: Permission denied
NETWORK_LaunchPacket: Address 192.168.1.255:15101
NETWORK_LaunchPacket: Permission denied
NETWORK_LaunchPacket: Address 192.168.1.255:15101
NETWORK_LaunchPacket: Permission denied
NETWORK_LaunchPacket: Address 192.168.1.255:15101
[...]
Steps To ReproduceSimply start skulltag-server on Linux, I guess it will complain too on *BSD.
Additional InformationUDP broadcasting needs SO_BROADCAST flag set using setsockopt as per POSIX. Something like this should do it:

int allow = 1;
setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &allow, sizeof(allow));
Attached Filespatch file icon fix-setsockopt.patch [^] (4,013 bytes) 2012-05-14 16:01 [Show Content]

- Relationships

-  Notes
User avatar (0003620)
Dusk (developer)
2012-05-13 23:54

Skulltag already uses this form of setsockopt. Are you sure this isn't just a problem with your router?
User avatar (0003622)
Koromix (reporter)
2012-05-14 16:07
edited on: 2012-05-14 16:13

OK I just found out about Torr Samaho's repository and dug the source a little. It appears that setsockopt was used incorrectly, as it was passed a bool which is implementation-defined and may not be of the same size as an int.

On my system, sizeof(bool) returns 1 while sizeof(int) is 4. Both Winsock and POSIX expect an int to be used, but I guess that either Windows' builds have sizeof(bool) == 4 or Winsock does not care about being given a char. Well, actually the MSDN says you should use BOOL which is defined as an int.

I made a small patch to fix all calls to setsockopt (in masterserver, in statsmaker, in src and for upnpnat code). It fixes the error on my system, but I can't build for Windows so you should check that it does not break anything (I doubt so, but I've been bitten more than once).

User avatar (0003625)
Torr Samaho (administrator)
2012-05-14 17:40

Thanks! Seems to work fine under Windows, so I added your patch.
User avatar (0003640)
Koromix (reporter)
2012-05-16 12:50

Thanks! Pulled and tested here, works perfectly for me :)
User avatar (0003649)
Dusk (developer)
2012-05-20 20:30

Marking this as resolved, then.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2012-05-13 13:12 Koromix New Issue
2012-05-13 23:54 Dusk Note Added: 0003620
2012-05-13 23:54 Dusk Status new => feedback
2012-05-14 16:01 Koromix File Added: fix-setsockopt.patch
2012-05-14 16:07 Koromix Note Added: 0003622
2012-05-14 16:07 Koromix Status feedback => new
2012-05-14 16:13 Koromix Note Edited: 0003622 View Revisions
2012-05-14 17:40 Torr Samaho Note Added: 0003625
2012-05-14 17:40 Torr Samaho Status new => feedback
2012-05-16 10:33 Dusk Status feedback => needs testing
2012-05-16 12:50 Koromix Note Added: 0003640
2012-05-20 20:30 Dusk Note Added: 0003649
2012-05-20 20:30 Dusk Status needs testing => resolved
2012-05-20 20:30 Dusk Fixed in Version => 1.0-beta
2012-05-20 20:30 Dusk Resolution open => fixed
2012-05-20 20:30 Dusk Assigned To => Dusk
2012-05-20 20:30 Dusk Assigned To Dusk =>
2012-05-20 20:30 Dusk Status resolved => feedback
2012-05-20 20:30 Dusk Resolution fixed => reopened
2012-05-20 20:30 Dusk Status feedback => resolved
2012-05-20 20:30 Dusk Resolution reopened => fixed
2012-05-20 20:30 Dusk Assigned To => Dusk
2012-05-20 20:30 Dusk Assigned To Dusk => Torr Samaho
2012-05-20 20:30 Dusk Status resolved => feedback
2012-05-20 20:30 Dusk Resolution fixed => reopened
2012-05-20 20:30 Dusk Status feedback => resolved
2012-05-20 20:30 Dusk Resolution reopened => fixed
2012-06-09 13:22 Torr Samaho Category General => Bug
2012-07-15 16:45 Blzut3 Fixed in Version 1.0-beta => 1.0
2018-09-30 19:53 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker