Repository navigation
Prevent Steam Networking IPs being added to DB & being parsed by SourceSleuth - #1600
Conversation
| * SDR / Steam Networking clients connect with a link-local 169.254.x.x address | ||
| * rather than their real IP. This can get legitimate players banned, so skip it. | ||
| */ | ||
| stock bool IsSteamNetworkingIP(const char[] ip) |
There was a problem hiding this comment.
Can you link official docs on this?
Also can be moved to an include since it's shared across plugins
There was a problem hiding this comment.
I can't find any official documentation that specifically states an IP assignment of "169.254.x.x" when using SDR in Source SDK 2013 games, but I did find direct reference to it in the source code:
There was a problem hiding this comment.
Got it, can you add this to the stock's comments.
There was a problem hiding this comment.
Technically, the comment also says "this is subject to change! Do not make assumptions about these addresses. or your code might break in the future." It points out that you could use "ISteamNetworkingUtils::IsFakeIP to determine if an IP address is a "fake" one used by this system," but I wouldn't have direct access to this without writing a new extension that SB++ would now have to rely on.
Given it's been several years without any change in the IP format, I highly doubt it's going to change any time soon. I think the current method is okay. Do you have any opinions?
|
I've added the comment from the Source 2013 SDK as requested. Please note my comment from earlier: Technically, the comment also says "this is subject to change! Do not make assumptions about these addresses. or your code might break in the future." It points out that you could use "ISteamNetworkingUtils::IsFakeIP to determine if an IP address is a "fake" one used by this system," but I wouldn't have direct access to this without writing a new extension that SB++ would now have to rely on. Given it's been several years without any change in the IP format, I highly doubt it's going to change any time soon. I think the current method is okay. Do you have any opinions? Adding to this: the IP format has remained the same since TF2's SDR implementation back in ~2021. |
Added a reference link to the Steam Networking Sockets documentation.
rumblefrog
left a comment
There was a problem hiding this comment.
couple things outside the diff:
- sbpp_checker.sp still uses raw GetClientIP (L191 count query, L284 sm_listbans), so SDR players still get matched against every 169.254 IP ban there
- existing 169.254.x.x values already in the DB (bans.ip, comms.adminIp, submissions, etc) stick around. probably want a cleanup migration to null those out
- since this changes plugin behavior self-hosters will see (sm_banip refusing SDR targets, sleuth skipping them), can you add a note to docs/src/content/docs/setup/plugin-setup.md
range check is fine by me btw, don't think it's worth pulling in an extension for IsFakeIP
Generated by Claude Code
…orkingIP, add phrase
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Added logic to update placeholder IPs in in-game reports, setting `ip` to an empty string and `sip` to NULL for specific conditions.
Description
Steam Networking / SDR IP addresses always use 169.254.x.x, which causes problems for a plugin like this. When every player uses the same IP range, SourceSleuth becomes ineffective and there's no point in storing these IPs in the first place, so I disable the IP check on this internal address range and disable storing it as well. This prevents existing IPs causing trouble as well as needlessly storing new ones.
Motivation and Context
This change fixes innocent players being banned from SDR-enabled servers that use SourceBans++ and do not know to turn off SourceSleuth (don't ask me how I know -- (the answer is experience)).
How Has This Been Tested?
I tested this by compiling my plugin changes, running a dedicated TF2 server on Windows with -enablefakeip, connecting to said server in TF2 via SDR, banning my alt account, and seeing it populate on my SB++ instance with no IP listed, exactly as expected.
Types of changes
Checklist: