toaster
fc80ee6679
SOCK_Send: Consistently unsigned types in iteration
...
Both mysocketses and broadcastaddresses are unsigned, but i and j were ptrdiff_t..?
These *also* just started erroring for me
2025-09-18 19:34:28 +01:00
Eidolon
0dc337c9a5
Fix lots of code for clang-cl compatibility
2025-09-17 17:24:32 -05:00
Eidolon
a4d304a1f5
Update copyright years to 2025
2025-02-13 15:32:26 -06:00
Sally Coolatta
7dfa597c7d
SRB2 -> DRRR copyright in src, acs, android folder
...
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
Eidolon
77567b03c4
Set broadcast socket ports to 5029
...
Fixes ASKINFO broadcast on LAN
2023-11-05 10:40:27 -06:00
AJ Martinez
f9f5c74244
New bans
2023-10-16 23:50:50 +00:00
AJ Martinez
e09b21ddae
IsExternalAddress type fixup, move into i_tcp.c / SOCK_ abstraction
2023-03-28 01:25:56 -07:00
AJ Martinez
a1f82b2a37
Use server IP and timestamp in PT_SERVERCHALLENGE to avoid signature reuse
2023-03-28 01:25:54 -07:00
AJ Martinez
2afc43383e
Jart node deadlock fixup part 2
2023-03-28 01:25:52 -07:00
AJ Martinez
a8c129321a
Block nodes while an auth challenge is taking place (jart)
2023-03-28 01:20:44 -07:00
James R
89abbd33b4
Kill last of DJGPP, WATTCP, _WINDOWS (ol' DirectDraw)
2022-09-24 19:43:44 -07:00
James R
f6a5ed9c6c
Remove NONET
2022-09-24 19:22:04 -07:00
VelocitOni
8a5707ad83
Merge branch 'master' into hostcode
2022-09-13 17:08:15 -04:00
X.organic
902fcfa569
Miscellaneous memory bug fixes to make AddressSanitizer happy
...
# Conflicts:
# src/d_clisrv.c
# src/dehacked.c
# src/hardware/hw_cache.c
# src/hardware/hw_md2.c
# src/http-mserv.c
# src/lua_hudlib_drawlist.c
2022-09-12 16:49:18 +01:00
James R
295880351a
Do not query DNS for holepunchserver more than once per tic
2022-08-28 16:57:36 +01:00
James R
09d48b00f8
Reset remotenode when discarding STUN/hole punch packet
...
Fixes some wild behavior when a lot of hole punching
requests are coming in.
2022-08-24 23:33:25 +01:00
toaster
6e26aff1e3
Free the banned struct on SOCK_ClearBans.
2022-08-24 21:58:38 +01:00
toaster
f728f164f5
Create a single struct for bannednode and bannednodetimelft, and use the matching ban ID inside that struct.
...
While this commit does not increase the visibility of ban reasons, it makes this possible later.
2022-08-24 21:53:49 +01:00
toaster
4ad6220f3e
Core 1.4 specific changes.
...
* Ensure it can compile.
* Removing vanilla 2.2 properties that slipped in to previous commits.
* Rearranging i_tcp.c to avoid implicit declaration.
* Complete rename of `IsNameGood` to `EnsurePlayerNameIsGood`.
* Add "BANFORMAT" header, for versioning support.
* Add conversion from 1.3-and-earlier format to new system.
* Don't ban the entire internet - convert zero-masks to the most specific ones.
# Conflicts:
# src/d_netcmd.c
# src/i_tcp.c
2022-08-24 21:52:49 +01:00
James R
2ec2873b3e
Fix compiler warnings
2022-08-24 21:07:42 +01:00
Sally Coolatta
d6e2410cbb
Ban improvements
...
- Save a note of the username, not just the reason.
- Allow setting a mask with the `banip` command.
- Make ban.txt's formatting a lot more sane. Username and reason are stored in quotes. The mask uses the same formatting as actual CDIR.
- Keep track of if we tried to load ban.txt. If it wasn't, then don't save over it with a blank file.
- Disallow quotes in player names, as it makes player name detection in console more annoying, and saving username in files scary.
2022-08-24 21:07:42 +01:00
Sally Coolatta
3096806f04
Kicks are now temp bans
...
Length is determined by the "kicktime" cvar, in minutes. By default, this is set to 10, but I'm willing to adjust this. Only applies to manual kicks (in the future, maybe also name filter kicks).
The timestamp for the unban time is even saved in ban.txt, so long-term temporary bans are completely possible. (I checked, you can attempt to ban someone for up to 1902 years if you really want to.)
2022-08-24 21:02:38 +01:00
Sally Coolatta
5ea0f69a83
- Attach ban reasons to banned_t
...
- Properly call D_SaveBan after remote bans. Bans are no longer saved in the ban command and instead wait for the actual kick to process, since before they were split between the two, which is what caused the discrepancy.
2022-08-24 21:02:38 +01:00
Sally Coolatta
2c604e2487
Combine banned & bannedmask into banned_t
...
Better code cleanliness, also makes it easier to add more data to bans later (such as a timestamp for temporary bans)
2022-08-24 21:02:38 +01:00
Sally Coolatta
e9ae1e3944
Start banned_size much smaller
2022-08-24 21:02:38 +01:00
Sally Coolatta
118eb0b3dd
Remove MAXBANS
...
Needs proper stress testing but seems to work.
2022-08-24 21:02:37 +01:00
Sally Coolatta
1f082f15e6
Merge SRB2 master
2021-02-27 02:25:14 -05:00
James R
b4e6bc6e67
Ignore zero length packets
2020-11-12 17:08:34 -08:00
James R
c8d4ef64f9
Hole punching
2020-11-12 17:08:34 -08:00
Sally Coolatta
fc934b38e1
Merge public next
2020-11-10 15:32:48 -05:00
James R
f7a4667bc3
Use STUN instead of curl to fetch the public IP address for Discord
...
RFC 5389 is a standard protocol that can be used for this instead of ip4.me.
I may have gone overboard on the CSPRNG... It was fun though.
2020-09-30 03:57:50 -07:00
James R
2c3b30de90
-clientport (it's back!) and -serverport, which is an alias to -port
...
If you ever need to, you can change the client port number.
(cherry picked from commit 17749b9e3e )
2020-08-19 18:16:54 -07:00
James R
e3a383aafc
Use a pointer for port_name
...
Using strcpy is stupid because we don't know how long the argument would be.
There's no need for a buffer anyway.
(cherry picked from commit 5921e1a567 )
2020-08-19 18:16:53 -07:00
James R
d365ea7981
Use a random port when connecting
...
(cherry picked from commit 8368449e6c )
2020-08-19 18:16:53 -07:00
Monster Iestyn
a030238ab3
added some helpful comments, remove duplicate code
2020-07-12 22:37:36 +01:00
Monster Iestyn
da07db9ad1
socklen_t isn't actually needed in either i_tcp.c or mserv.c if NONET is on!
...
(also added some more tabbing)
2020-07-12 22:29:15 +01:00
Monster Iestyn
cb93e95847
* i_tcp.c: merge these three ifndef USE_WINSOCK blocks together
...
* mserv.c: added i_tcp.c's USE_WINSOCK macros so socklen_t isn't redundantly defined if Winsock 2 is used
2020-07-12 22:24:10 +01:00
Monster Iestyn
56f349f6e7
i_tcp.c: SCOUW2 and SCOUW7 haven't been defined since we got rid of Doom Legacy's makefiles for UnixWare 2/7 (which are ANCIENT), so get rid of them!
2020-07-12 22:08:35 +01:00
Monster Iestyn
ce57b2ccbc
added tabbing to some of the preprocessor code in i_tcp.c and mserv.c to make it easier to read them (and to allow me to understand what I need to do for the next commit)
2020-07-12 21:31:25 +01:00
Louis-Antoine
70f4d12d38
Rename some file transfer functions
2020-05-12 19:06:40 +02:00
Wolfy
f35bdf3bb7
Revert basically every attempted join passwords fix
2020-04-26 01:20:46 -07:00
Latapostrophe
dc00dbdeee
Merge branch 'ignore-posthumous-ackret' of git.magicalgirl.moe:KartKrew/Kart-Public into v1-ignore-posthumous-ackret
2020-04-05 11:23:29 +02:00
fickleheart
8219268f2e
Add support for srb2:// URL handler (server links)
2020-03-21 01:36:39 -05:00
James R
2274129f57
Update copyright year to 2020
2020-02-19 14:08:45 -08:00
James R
17749b9e3e
-clientport (it's back!) and -serverport, which is an alias to -port
...
If you ever need to, you can change the client port number.
2019-12-18 15:47:47 -08:00
James R
5921e1a567
Use a pointer for port_name
...
Using strcpy is stupid because we don't know how long the argument would be.
There's no need for a buffer anyway.
2019-12-18 15:43:29 -08:00
James R
8368449e6c
Use a random port when connecting
2019-12-18 15:34:55 -08:00
Steel Titanium
a5cdb0a4b3
Update copyright date on source files
2019-12-06 13:49:42 -05:00
Steel Titanium
1bad85a68b
New -port command line paramater
2019-10-13 20:04:45 -04:00
James R
d4e950f17b
Don't use client port as default peer port
2019-07-04 16:38:00 -07:00