Remove the IP check when processing game info or version deny as the IP might be translated (IPv6 especially)
This commit is contained in:
parent
dbf4d55839
commit
2c2dc3fc13
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
|||
20091124
|
||||
--------
|
||||
include/args.h, main/net_udp.c, main/net_udp.h, main/gameseg.c, main/fireball.c, main/multi.c, main/multi.h, main/inferno.c, main/menu.c, main/titles.c, main/object.c, main/kmatrix.c, main/kmatrix.h, main/newdemo.c, main/config.c, main/net_ipx.c, main/config.h, main/net_ipx.h, main/gameseq.c, main/gamerend.c, main/vers_id.h, main/gauges.c, main/gamecntl.c, INSTALL.txt, misc/args.c, SConstruct, d1x.ini, README.txt, arch/linux/ipx.c, arch/linux/ipx_kali.c, arch/win32/ipx.c: Abstracting networking protocols - Step 4: Implemented new UDP layer with Client/Server communication, Packet Loss Prevention and strict Version checking. Netgames list will follow later.
|
||||
main/net_udp.c: Remove the IP check when processing game info or version deny as the IP might be translated (IPv6 especially)
|
||||
|
||||
20091122
|
||||
--------
|
||||
|
|
|
@ -1507,9 +1507,6 @@ void net_udp_send_version_deny(struct _sockaddr sender_addr)
|
|||
|
||||
void net_udp_process_version_deny(ubyte *data, struct _sockaddr sender_addr)
|
||||
{
|
||||
if (memcmp((struct _sockaddr *)&Netgame.players[0].protocol.udp.addr, (struct _sockaddr *)&sender_addr, sizeof(struct _sockaddr)))
|
||||
return;
|
||||
|
||||
Netgame.protocol.udp.program_iver = GET_INTEL_INT(&data[1]);
|
||||
Netgame.protocol.udp.valid = -1;
|
||||
}
|
||||
|
@ -1780,10 +1777,8 @@ void net_udp_process_game_info(ubyte *data, int data_len, struct _sockaddr game_
|
|||
{
|
||||
if (data_len > UPKT_MAX_SIZE)
|
||||
return;
|
||||
|
||||
// Check if this game info comes from the address, we've already choosen
|
||||
if (memcmp((struct _sockaddr *)&Netgame.players[0].protocol.udp.addr, (struct _sockaddr *)&game_addr, sizeof(struct _sockaddr)))
|
||||
return;
|
||||
|
||||
memcpy((struct _sockaddr *)&Netgame.players[0].protocol.udp.addr, (struct _sockaddr *)&game_addr, sizeof(struct _sockaddr));
|
||||
|
||||
len++; // skip UPID byte
|
||||
Netgame.protocol.udp.program_iver = GET_INTEL_INT(&(data[len])); len += 4;
|
||||
|
|
Loading…
Reference in a new issue