network: accept SO_ONESBCAST on Windows (BO2 local lobby, #1752) #2432
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2432
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2432/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@HarrySpruce on GitHub · 2026-11-19 23:18 UTC · original
HarrySpruce:bo2-local-lobby→main· +3 −1 · 1 files · 1 commits · merged 2026-11-20 00:29 UTCBug: In Call of Duty: Black Ops II (PPSA34502) on Windows, local Zombies and Multiplayer lobbies can't start a match. The setup screen shows "1 Player (4 Max)" next to "Cannot begin the game. Minimum 1 players.", and START MATCH stays greyed out. This was reported as the second finding in #1752.
Cause: The lobby opens a UDP socket and sets SNDBUF, RCVBUF, SNDTIMEO, SO_BROADCAST and then
SO_ONESBCAST(0xffff/0x10000). Only the Linux path handles 0x10000. On Windows,ConvertSocketOptionNamepasses the raw ID through to Winsock, which rejects it. The game closes the socket and starts over. One session's log has about 2300 socket creations repeating that exact sequence, so the lobby never comes up and the local player never counts as joined.Change: run the existing Linux
SO_ONESBCASThandling on Windows as well. SO_BROADCAST is already set by then, and Winsock sends to 255.255.255.255 with it, so accepting the option is enough. The macOS path is unchanged.Tested: Windows 11, i5-13600KF, RTX 4070, PPSA34502 v01.010.000. After the change, the log shows the socket continuing from 0x10000 to NBIO and bind, and only 5 sockets are created in total. Zombies → Local now lets the player start a match.
This is the same idea as part of
750a0f7cfrom #1093, which was closed without that commit being merged.AI-assisted: yes (diagnosis, code and description).
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-19 23:22 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
The SO_ONESBCAST compatibility branch now applies on Windows as well as Linux. Option 0x10000 requires an int-sized value. The branch succeeds when the option is enabled and returns POSIX_ENOPROTOOPT when it is disabled.
Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
fa889This change lets Black Ops II local lobbies start on Windows by accepting the broadcast socket option the game sets. It is a small change with a low-risk fallback, and the reported testing shows the intended behavior, so no merge-blocking risk is evident.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the change (accepting SO_ONESBCAST on Windows in the network code) and the affected game lobby, which matches the summary and objectives. It is specific enough for a teammate scanning history to understand the primary change.
Full details: Description check
Explanation
The description explains the bug in Call of Duty: Black Ops II lobbies on Windows, the cause (Winsock rejecting SO_ONESBCAST 0x10000 while Linux handles it), the change (reusing the Linux handling on Windows), and testing. It relates directly to the changeset.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
d03f7902-b2e3-4ac0-a830-71a0dfa8ed73Reviewing files that changed from the base of the PR and between
861b07b8bbandfa889a330b.src/libs/network.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.