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
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
Steel Titanium
db34bcbdbf
Prettyify code.
2019-04-28 22:02:25 -04:00
Steel Titanium
353a5b1b61
New -port param
2019-04-28 21:53:36 -04:00
Monster Iestyn
257f31c1ba
Merge branch 'public_next'
...
# Conflicts:
# src/doomstat.h
# src/g_game.c
2019-03-28 14:19:02 +00:00
fickleheart
c37b570cf9
Fix compile issues
2019-03-26 08:26:41 -05:00
fickleheart
7f0249a1ce
Free nodes properly in cleanupnodes
...
Hopefully the other changes herein have rendered
cleanupnodes obsolete, but I'm not too sure of
that.....
2019-03-26 01:10:00 -05:00
fickleheart
307f4a0638
Wacky attempt at not reopening nodes for D/Ced ackreting clients
2019-03-25 22:22:25 -05:00
James R
6939dca52a
Actually allow connecting to "localhost"
...
Because IPv6 doesn't seem to work anyway.
2019-03-20 20:37:00 -07:00
James R
25bd4a0876
Let localhost connections
2019-03-20 20:37:00 -07:00
mazmazz
81352aece1
WIP 20190101 merge
...
d_netcmd.c
filesrch.c
m_menu.c
p_setup.c
p_spec.c
r_data.c
r_main.c
r_things.c
w_wad.c
w_wad.h
2019-01-02 01:09:15 -05:00
Alam Ed Arias
582905f04f
Netcode: handle NULL in addrinfo lookup
2018-12-22 21:06:13 -05:00
Monster Iestyn
d824e05a6f
Merge branch 'master' into next
2018-11-25 20:39:17 +00:00
mazmazz
c91b2b4456
Update source copyrights to 2018
2018-11-25 07:35:38 -05:00
Monster Iestyn
7989e9a482
Merge branch 'public_next'
...
# Conflicts:
# src/d_netcmd.c
# src/d_netcmd.h
# src/dehacked.c
# src/g_game.h
# src/hardware/hw_draw.c
# src/hardware/hw_main.c
# src/lua_baselib.c
# src/lua_hook.h
# src/lua_hooklib.c
# src/lua_hudlib.c
# src/lua_libs.h
# src/lua_maplib.c
# src/lua_script.c
# src/m_misc.h
# src/p_mobj.c
# src/s_sound.c
# src/sdl12/mixer_sound.c
# src/w_wad.c
2018-11-10 15:41:57 +00:00
Monster Iestyn
68305c3b18
Merge branch 'master' into next
2018-11-08 20:50:58 +00:00
Monster Iestyn
993f6b1725
don't bother with inlining the function, on second thoughts
2018-10-27 16:47:56 +01:00
Monster Iestyn
c965964f9a
static the buffer, forgot to do this earlier
2018-10-27 16:27:00 +01:00
Monster Iestyn
69b7699b2f
Use temporary buffer with a max size of 255 bytes instead of having Microsoft's FormatMessageA alloc one for us. Also, provide a fallback message in case no message was available for some reason
2018-10-27 16:09:14 +01:00
Monster Iestyn
ec708dcf13
Save the result of errno (aka WSAGetLastError() for WinSock) as soon as possible, to prevent anything in SOCK_GetNodeAddress resetting the value to 0 while trying to print the message for the error itself!
2018-10-27 15:49:04 +01:00
Monster Iestyn
1d40033de6
Creating a quick get_WSAErrorStr function to act as a wrapper for FormatMessageA so we can string-ify Winsock errors properly
...
Untested!
2018-10-27 15:36:15 +01:00
Monster Iestyn
78130e830e
Merge branch 'public_next'
...
# Conflicts:
# src/p_setup.c
# src/r_data.c
2018-09-11 16:41:27 +01:00
Monster Iestyn
d68585a9d0
SOCK_Send: Split the actual sending data parts into a new function, SOCK_SendToAddr, to make everything look a bit neater in general
2018-09-03 20:53:40 +01:00
Monster Iestyn
339ffe8d08
UDP_Socket: I doubt client addresses are meant to be included in the total for broadcast addresses
2018-09-03 15:56:02 +01:00
Monster Iestyn
f5b88ee37d
SOCK_Send: Fix what appears to be a mistaken use of i instead of j
2018-09-03 15:52:22 +01:00
Monster Iestyn
4bb12fb79f
UDP_Socket: Add missing limit checks for s, for client and broadcast addresses
2018-09-03 15:43:36 +01:00