From 3c13aab8e581994b141445250608dc036b7e3328 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Tue, 13 May 2014 00:39:11 +0100 Subject: [PATCH] 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. --- src/router.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/router.c b/src/router.c index 6d2eb4b..237c7fa 100644 --- a/src/router.c +++ b/src/router.c @@ -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) {