Anonymous | Login | Signup for a new account | 2025-07-27 18:02 UTC | ![]() |
My View | View Issues | Change Log | Roadmap | Zandronum Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000847 | Zandronum | [All Projects] Bug | public | 2012-05-13 13:12 | 2018-09-30 19:53 | ||||
Reporter | Koromix | ||||||||
Assigned To | Torr Samaho | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux | OS | Arch Linux | OS Version | |||||
Product Version | 98d | ||||||||
Target Version | Fixed in Version | 1.0 | |||||||
Summary | 0000847: Broadcast permission denied | ||||||||
Description | Here 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 Reproduce | Simply start skulltag-server on Linux, I guess it will complain too on *BSD. | ||||||||
Additional Information | UDP 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 Files | ![]() | ||||||||
![]() |
|
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? |
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). |
Torr Samaho (administrator) 2012-05-14 17:40 |
Thanks! Seems to work fine under Windows, so I added your patch. |
Koromix (reporter) 2012-05-16 12:50 |
Thanks! Pulled and tested here, works perfectly for me :) |
Dusk (developer) 2012-05-20 20:30 |
Marking this as resolved, then. |
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. |
![]() |
|||
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 |
Copyright © 2000 - 2025 MantisBT Team |