1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Accept IPX packets with a destination network of 00:00:00:00.

Unless configured otherwise, the Windows IPX driver defaults to misusing this on
the wire until it sees a packet with a different network number, at which point
it switches to using that until reboot.
This commit is contained in:
Daniel Collins 2014-05-13 00:39:11 +01:00
parent 098cb76ff4
commit 3c13aab8e5

View File

@ -182,6 +182,7 @@ void router_cleanup(void)
#define BCAST_NET addr32_in((unsigned char[]){0xFF,0xFF,0xFF,0xFF})
#define BCAST_NODE addr48_in((unsigned char[]){0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
#define ZERO_NET addr32_in((unsigned char[]){0x00,0x00,0x00,0x00})
static void _deliver_packet(
uint8_t type,
@ -363,7 +364,8 @@ static void _handle_udp_recv(ipx_packet *packet, size_t packet_size, struct sock
if(
s->flags & IPX_IS_SPX
&& s->flags & IPX_LISTENING
&& memcmp(req->net, s->addr.sa_netnum, 4) == 0
&& (memcmp(req->net, s->addr.sa_netnum, 4) == 0
|| addr32_in(req->net) == ZERO_NET)
&& memcmp(req->node, s->addr.sa_nodenum, 6) == 0
&& req->socket == s->addr.sa_socket)
{